Is there a neat way to access a BIRT report's datasets to add/modify some filters. I know I can just change the XML(rptdesign) file but I'm hoping for a java method or something. By the way, I'll access it through PHP-Java Bridge because my front-end is on PHP.
A:
I am not sure what you mean with "filters", but you can create BIR reports that take report parameters that you can pass. e.g. pass a user (xxx) name to show a report with a query that is tailored to the specified user (aka SQL WHERE user==xxx)
lothar
2009-04-04 01:06:01
A:
Ok I just don't want this left unanswered.
The solution is to access the design element, then the dataset, then add filter conditions from there.
$report = $birtReportEngine->openReportDesign("${here}/myreport.rptdesign");
$filter = new java("org.eclipse.birt.report.model.api.elements.structures.FilterCondition"); // create a new filter condition object
$filter->setExpr("row['id']");
$filter->setOperator("in");
$filter->setValue1('["32","679","333","233"]');
$report->getDesignHandle()->findDataSet("Employees")->addFilter($filter);
Gian Basagre
2009-04-26 11:51:47
A:
@Gian Basagre Is this javascript you have used to write the code to add filter to the BIRT report?
ankitKinra
2010-10-07 10:40:48