|
Re: dataset filter in subreports [message #869676 is a reply to message #869088] |
Thu, 03 May 2012 16:46   |
|
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 #869861 is a reply to message #869703] |
Fri, 04 May 2012 14:56  |
|
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 14:56  |
|
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 14:56  |
|
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 14:56  |
|
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?
|
|
|
Powered by
FUDForum. Page generated in 0.02507 seconds