COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Report Studio => Topic started by: KEKeogh on 06 Feb 2009 04:27:02 PM

Title: Filter Information in Header
Post by: KEKeogh on 06 Feb 2009 04:27:02 PM
I remember in Cognos Impromptu you used to be able to show the filter text in a header.

Can we do something similar in Cognos 8.3 Report Studio?

What I would like to do is this:

I have the following filter:
[DSR] between _first_of_month(_add_months(current_date,-1)) and _add_days(_first_of_month(current_date),-1)

This returns the data for the previous month.  Now I want the header to state those dates returned. 

Like if I ran the report today February 6, 2009, the data for all of January 2009 will show up.   
And the header I would like to somehow state the dates January 1, 2009 through January 31, 2009.

That way once the report has run any person receiving it knows what dates were filtered for, since dates do not show in the actual report.

Anyone know of a way to accomplish this?

Thanks
Kathie
Title: Re: Filter Information in Header
Post by: Gopinath on 10 Feb 2009 02:28:28 AM
Create 2 data items in your query

Data item1 with following expression:
_first_of_month(_add_months(current_date,-1))

Data item2 with:
_add_days(_first_of_month(current_date),-1)


Drag and drop a text item in the report header and hard code "[DSR] between " and "and" as text. Now drag and drop the data items in between them.

Hope this helps.
Title: Re: Filter Information in Header
Post by: KEKeogh on 12 Feb 2009 10:51:15 AM
That solution works for now.

But I was hoping to have something so that if someone changes the filter the two query data items in the header automatically update.