Skip to main content



      Home
Home » Archived » BIRT » Dynamic filtering question
Dynamic filtering question [message #264642] Wed, 16 January 2008 10:49 Go to next message
Eclipse UserFriend
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.
Sorry Double Post [message #264657 is a reply to message #264642] Wed, 16 January 2008 11:51 Go to previous messageGo to next message
Eclipse UserFriend
Double Post.

Sorry, i though my first message didn't get through.
Re: Dynamic filtering question [message #264706 is a reply to message #264642] Wed, 16 January 2008 21:50 Go to previous message
Eclipse UserFriend
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.
>
Previous Topic:Filtering question
Next Topic:When is fetch called in Scripted Data Source
Goto Forum:
  


Current Time: Sat Jul 26 01:45:20 EDT 2025

Powered by FUDForum. Page generated in 0.05907 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top