Dynamic filtering question [message #264642] |
Wed, 16 January 2008 10:49  |
Eclipse User |
|
|
|
Currently using BIRT 2.2 on Win XP
I've got a data set that i would like to allow the user to filter using
the a parameter i create. The values in my paramater list are "PASS",
"FAIL" and "ALL".
If the user selects "PASS" or "FAIL" then only records with those values
will be shown, but for "ALL" i want all records to be shown. I'm not sure
how to show all the records though. What's the best way for me to do
this? Thanks.
|
|
|
|
Re: Dynamic filtering question [message #264706 is a reply to message #264642] |
Wed, 16 January 2008 21:50  |
Eclipse User |
|
|
|
Originally posted by: johnw.innoventsolutions.com
Rustican,
You can do this with a filter expression, or dynamically edit the
dataset at runtime to add in the where clause for the query. Either way
should work.
The easier way would be the filter, but depending on the data set, it
might also have the larger amount of overhead.
Something like:
if (params["filterParam"] != "ALL")
if (params["filterParam"] == "PASS")
"PASS";
if (params["filterParam"] == "FAIL")
"FAIL";
Or, to modify the query, you could probably put the following into the
datasets open or beforeOpen method:
if (params["filterParam"] == "PASS"
{
this.queryText += "where status = 'PASS'";
}
if (params["filterParam"] == "FAIL"
{
this.queryText += "where status = 'FAIL'";
}
Note, this is just off the top of my head, I haven't tested either of
these to be sure, but the idea should be right.
Rustican wrote:
> Currently using BIRT 2.2 on Win XP
>
> I've got a data set that i would like to allow the user to filter using
> the a parameter i create. The values in my paramater list are "PASS",
> "FAIL" and "ALL".
>
> If the user selects "PASS" or "FAIL" then only records with those values
> will be shown, but for "ALL" i want all records to be shown. I'm not
> sure how to show all the records though. What's the best way for me to
> do this? Thanks.
>
|
|
|
Powered by
FUDForum. Page generated in 0.05907 seconds