[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.birt] Re: Filtering question
|
- From: Jason Weathersby <jasonweathersby@xxxxxxxxxx>
- Date: Wed, 16 Jan 2008 13:05:00 -0500
- Newsgroups: eclipse.birt
- Organization: EclipseCorner
- User-agent: Thunderbird 2.0.0.9 (Windows/20071031)
Rustican,
One way to do this is to add the filter in the beforeFactory event handler:
importPackage(Packages.org.eclipse.birt.report.model.api);
importPackage(Packages.org.eclipse.birt.report.model.api.elements);
//dshandle =
reportContext.getReportRunnable().designHandle.getDesignHandle().findDataSet("Data
Set");
dshandle =
reportContext.getReportRunnable().designHandle.getDesignHandle().getDataSets().get(0);
fc = StructureFactory.createFilterCond();
fc.setExpr("dataSetRow[\"COUNTRY\"]");
fc.setOperator(DesignChoiceConstants.MAP_OPERATOR_EQ);
fc.setValue1("'USA'");
dshandle.addFilter(fc);
You can check the value of the parameter before actually adding the filter.
Jason
Rustican wrote:
I have a data set with a Status column with either a "PASS" or "FAIL"
value. I've set up a parameter to allow a user to filter the dataset by
either of those values. But i also want to allow the user to be able to
select a "ALL" value from the drop down which shows all the pass and
failed. How can i do this using the filtering options in BIRT?
I'm using BIRT 2.2 on WinXP Thanks!