Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Adding a dynamic filter to a data set
Migrateduser
Hello.<br />
<br />
I need to filter a data set based on the parameter passed, i.e. apply a filter to a data set at runtime. I found a way to apply a filter to a data set by adding this code in dataSet.beforOpen() method:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
var filter = new org.eclipse.birt.report.model.api.elements.structures.FilterCondition();
filter.setExpr("row['CUSTOMERNAME']");
filter.setOperator("eq");
filter.setValue1("'Atelier graphique'");
reportContext.getDesignHandle().findDataSet("Data Set").addFilter(filter);
</pre>
This code adds a filter to a design rather than to a runtime data set object and that's not what I really need. It adds the same filter every time a data set opens which is not good and most significantly it doesn't work in some cases.<br />
I.e. I tested it on a single data set and it worked fine, but after I added a chart it stopped working ...<br />
<br />
Could you please help me with this problem.<br />
<br />
Thank you in advance.
Find more posts tagged with
Comments
There are no comments yet