Skip to main content



      Home
Home » Archived » BIRT » dataset filter in subreports(using report date parameters to filter sub-reports)
icon12.gif  dataset filter in subreports [message #869088] Wed, 02 May 2012 19:55 Go to next message
Eclipse UserFriend
I have startdate and enddate (datetime format) in the main report that I want to filter the subreport and it doesn't seem to be working. The date fields in the subreport is date format, while the start and end date report parameters in the main report are datetime, could that be the cause the the filter note working?

Also I'm not sure how the dataset filters work. Example if A+B=C (true) I use "Is True" to test the condition and it doesn't seem to work. if I say A+B=C (true) and i use "Is False" it seems to work.... I'm confused. LOL
Re: dataset filter in subreports [message #869676 is a reply to message #869088] Thu, 03 May 2012 12:46 Go to previous messageGo to next message
Eclipse UserFriend
Mike

Can you post the report?
If you are using the is true filter, your expression must return true
for the row to appear in the results. See attached example which uses
this expression:

if( row["QUANTITYORDERED"] > 30 ){
true;
}else{
false;
}

This will filter out rows that have a qty ordered less than or equal to
30. I realize this may sound counter intuitive :>

Jason

On 5/2/2012 7:55 PM, Mike Johnson wrote:
> I have startdate and enddate (datetime format) in the main report that I
> want to filter the subreport and it doesn't seem to be working. The date
> fields in the subreport is date format, while the start and end date
> report parameters in the main report are datetime, could that be the
> cause the the filter note working?
>
> Also I'm not sure how the dataset filters work. Example if A+B=C (true)
> I use "Is True" to test the condition and it doesn't seem to work. if I
> say A+B=C (true) and i use "Is False" it seems to work.... I'm confused.
> LOL
Re: dataset filter in subreports [message #869703 is a reply to message #869676] Thu, 03 May 2012 18:14 Go to previous messageGo to next message
Eclipse UserFriend
... and this will work as well with dates i.e.
if (startDate >= paramStartDate)
true;
else
false;


...filter "is true" --- accept records that are greater or equal to the main report report startDate parameter.

i was wondering if the main report startdate parameter is "datetime" and the database report startdate field is "date" format will the logic test still work?
Re: dataset filter in subreports [message #869861 is a reply to message #869703] Fri, 04 May 2012 10:56 Go to previous message
Eclipse UserFriend
Mike

Try an expression like:

if( BirtComp.greaterThan(row["ORDERDATE"],
params["datetimefilter"].value) ){
true;
}else{
false;
}

See attached example.

Jason

On 5/3/2012 6:14 PM, Mike Johnson wrote:
> ... and this will work as well with dates i.e. if (startDate >=
> paramStartDate)
> true;
> else
> false;
>
>
> ...filter "is true" --- accept records that are greater or equal to the
> main report report startDate parameter.
>
> i was wondering if the main report startdate parameter is "datetime" and
> the database report startdate field is "date" format will the logic test
> still work?
Re: dataset filter in subreports [message #869863 is a reply to message #869703] Fri, 04 May 2012 10:56 Go to previous message
Eclipse UserFriend
Mike

Try an expression like:

if( BirtComp.greaterThan(row["ORDERDATE"],
params["datetimefilter"].value) ){
true;
}else{
false;
}

See attached example.

Jason

On 5/3/2012 6:14 PM, Mike Johnson wrote:
> ... and this will work as well with dates i.e. if (startDate >=
> paramStartDate)
> true;
> else
> false;
>
>
> ...filter "is true" --- accept records that are greater or equal to the
> main report report startDate parameter.
>
> i was wondering if the main report startdate parameter is "datetime" and
> the database report startdate field is "date" format will the logic test
> still work?
Re: dataset filter in subreports [message #869864 is a reply to message #869703] Fri, 04 May 2012 10:56 Go to previous message
Eclipse UserFriend
Mike

Try an expression like:

if( BirtComp.greaterThan(row["ORDERDATE"],
params["datetimefilter"].value) ){
true;
}else{
false;
}

See attached example.

Jason

On 5/3/2012 6:14 PM, Mike Johnson wrote:
> ... and this will work as well with dates i.e. if (startDate >=
> paramStartDate)
> true;
> else
> false;
>
>
> ...filter "is true" --- accept records that are greater or equal to the
> main report report startDate parameter.
>
> i was wondering if the main report startdate parameter is "datetime" and
> the database report startdate field is "date" format will the logic test
> still work?
Re: dataset filter in subreports [message #869867 is a reply to message #869703] Fri, 04 May 2012 10:56 Go to previous message
Eclipse UserFriend
Mike

Try an expression like:

if( BirtComp.greaterThan(row["ORDERDATE"],
params["datetimefilter"].value) ){
true;
}else{
false;
}

See attached example.

Jason

On 5/3/2012 6:14 PM, Mike Johnson wrote:
> ... and this will work as well with dates i.e. if (startDate >=
> paramStartDate)
> true;
> else
> false;
>
>
> ...filter "is true" --- accept records that are greater or equal to the
> main report report startDate parameter.
>
> i was wondering if the main report startdate parameter is "datetime" and
> the database report startdate field is "date" format will the logic test
> still work?
Previous Topic:BIRT not able to use TypeFace when creating styles
Next Topic:Line-wrapped data field with horizontal lines?
Goto Forum:
  


Current Time: Mon May 12 23:15:49 EDT 2025

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

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

Back to the top