on 05-12-2009 11:05 AM
Hi All,
I have a requirement where i have to extrcat filters from the Webi Document.using java SDK.
I am trying to find the class called "filterable"but not able to use in my java code and will get always
"java.lang.ClassCastException com.businessobjects.wp.om.OMDocument cannot be cast to com.businessobjects.rebean.wi.Filterable"
I am using the below java code like
ReportElement re=document.getStructure()
FilterContainer flt=((Filterable) re).getFilter()
I am stuck and need this in uregent.
Please help.
Hi Rajeev,
To retrieve a FilterContainer you will need to traverse the report structure:
ReportStructure boReportStructure = boDocumentInstance.getStructure();
ReportContainer boReportContainer = (ReportContainer) boReportStructure.getReportElement(0);
FilterContainer boFilterContainer = null;
if (boReportContainer.hasFilter()) {
boFilterContainer = boReportContainer.getFilter();
} else {
boFilterContainer = boReportContainer.createFilter(LogicalOperator.AND);
}
Calling boDocumentInstance.getStructure() will retrieve the entire structure for the document.
Calling boReportStructure.getReportElement(0) will retrieve the structure for the first report of the document.
Hope this helps.
Regards,
Dan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.