COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: devardekartb on 17 Oct 2016 08:01:23 AM

Title: unable to add the filter in the report
Post by: devardekartb on 17 Oct 2016 08:01:23 AM
I am working on an existing report based on sybase databse.The report contains the detail filter as below:
[Data item 1]=maximum([Data Item 1] for [Data Item 2])
Data Item 1= Date values.
when I am trying to generate the sql(native) of query the query does not contain the expression for above detail filter.
when i tried IBM Cognos sql option it is producing incorrect expression for above filter.

please advise how I can include the above condition in where clause of report query.
Title: Re: unable to add the filter in the report
Post by: HalfBloodPrince on 18 Oct 2016 02:13:46 AM
Try changing filter property to after auto aggregation
Title: Re: unable to add the filter in the report
Post by: AnalyticsWithJay on 18 Oct 2016 12:40:47 PM
Quote from: devardekartb on 17 Oct 2016 08:01:23 AM
I am working on an existing report based on sybase databse.The report contains the detail filter as below:
[Data item 1]=maximum([Data Item 1] for [Data Item 2])
Data Item 1= Date values.
when I am trying to generate the sql(native) of query the query does not contain the expression for above detail filter.
when i tried IBM Cognos sql option it is producing incorrect expression for above filter.

please advise how I can include the above condition in where clause of report query.

There's no reason that shouldn't work. If you create a simple query with data item 1, data item 2 and the filter, do you see it?

Could you post the generated Native SQL? Simplify it to include only the items that are needed for this issue for ease of readability.

What's the exact and full error message you see when you try to generate the Cognos SQL?