Skip to Content

Enhancement Passing Drill Fitler for OpenDocument with\without refresh

Do you want to retreive a view of report filter by certain dimension without refreshing against the DB?  How about giving user a default view and allow them to apply different set of filters, again without calling a new parameter\report refresh?

The standard OpenDocument functionally does not support filter pass through, the only option is to parameterized and refresh the report every time.  With this customFilter addon will usability and performance impact if data does not need to update and you just want to pass contextual drill down.

Below is example code to on how to achieve this in SAP Business Objects XI R3.

The other standard syntax is still availlable along the support of SSO and other out of box capabilities of opendocument (; this extens with capalbity to pass drill filter.

How to use it:

Same standard feature suppport of opendocument with addtional fitler parameter naming.


How to deploy this?

1) Copy the inline .jsp code below and name it customFilterTo.jsp (new file)

2) Place customFilterTo.jsp page to folder <Tomcat>\webapps\AnalyticalReporting\Viewers\cdz_ad

There is no impact to existing deployment.  I have not research\found the correcsponding deployment path for BI4 yet.  Welcome for suggestion!

Enjoy... Cheers...

--------------------- code below  customFilterTo.jsp---------

-----------updated 7/3 for handling special characters ie New York (with space) -------------------------------------------------


include file="wistartpage.jsp" %>


page import="," %>




Path:     Tomcat55\webapps\AnalyticalReporting\viewers\cdz_ad

Usage:     http://nvpal685:8080/OpenDocument/opendoc/

To pass slice filter use dfNameOfFilter=value



"expires", 0);



String strViewerID = requestWrapper.getQueryParameter(

"iViewerID", true);

String strEntry = requestWrapper.getQueryParameter(

"sEntry", true);

String strHierarchy = requestWrapper.getQueryParameter(

"hierarchy", false, "");

strHierarchy = URLDecoder.decode(strHierarchy,


String strReportId = requestWrapper.getQueryParameter(

"iReport", true);

int iReport = Integer.parseInt(strReportId);

String strQueryString = requestWrapper.getQueryString();




//reset next one

strQueryString= strQueryString.substring(strQueryString.indexOf(

"df"), strQueryString.length());


"df") + " strQueryString " + strQueryString);

DocumentInstance doc = reportEngines.getDocumentFromStorageToken(strEntry);

Reports reports = doc.getReports();

Report objReport = reports.getItem(iReport);

//delete later

DrillInfo objDrillInfo = (DrillInfo)objReport.getNamedInterface(


DrillPath objDrillPath = objDrillInfo.getDrillPath();


DrillFromElement objDrillFromElt = (DrillFromElement)objDrillPath.getFrom().add();

DrillBar objDrillBar =


DrillBarObject objDrillBarObject =


int nbEltDrillBar = 0;



objDrillBar = objDrillInfo.getDrillBar();


catch(Exception e1) {}

if (null != objDrillBar)

nbEltDrillBar = objDrillBar.getCount();

boolean yesDrill = false;


for (int i=0; i<nbEltDrillBar; i++)


objDrillBarObject = objDrillBar.getItem(i);

String strParamID = objDrillBarObject.getID();

String strParamName = objDrillBarObject.getName();

String strParamValue =  requestWrapper.getQueryParameter(

"df" + strParamName) ;

System.out.println(strParamName +

" = " + strParamValue  );

// Verify if the dirll filter param\value is being pass

if (strParamValue != null)


strParamValue = strParamValue );


objDrillFromElt.setFilter( strParamValue );




strEntry = doc.getStorageToken();

//prepare for new doc instance for next drill object

if (i < nbEltDrillBar-1)


doc = reportEngines.getDocumentFromStorageToken(strEntry);

reports = doc.getReports();

objReport = reports.getItem(iReport);

objDrillInfo = (DrillInfo)objReport.getNamedInterface(


objDrillPath = objDrillInfo.getDrillPath();


objDrillBar = objDrillInfo.getDrillBar();

objDrillFromElt = (DrillFromElement)objDrillPath.getFrom().add();




//Apply changes

//strEntry = doc.getStorageToken();


objUtils.setSessionStorageToken(strEntry, strViewerID, session);


"sEntry", strEntry);



<jsp:forward page="report.jsp"></jsp:forward>




(Exception e)



"_ERR_DRILL", true, out, session);