COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: sanchoniathon on 28 Sep 2009 01:02:16 PM

Title: Display date of report execution + 1 day
Post by: sanchoniathon on 28 Sep 2009 01:02:16 PM
Hello,

1- We have this simple list report with only 1 query and a few data items
2- In the header section of the report we display the DATE of the day the report is executed.
Let's say we are the 21-04-2009 and i run the report, then the DATE that will be displayed in the report will be Tuesday 21 April 2009 because
of the format i have applied.

How to i mange this, IF I WHANT TO SHOW THE DATE THAT THE REPORT RUNS + 1 DAY ? So in this example it would show Wednesday 22 April 2009.
Do i need to create myself a DATA ITEM containin the Current Date and 1 to i ?
Any detailed information would be greatly appreciated. 

Thanks in advance !
Title: Re: Display date of report execution + 1 day
Post by: Suraj on 28 Sep 2009 01:11:36 PM
Create a new data item using a function called _add_days that should work in your case.
eg.
_add_days([Date item],1)
Title: Re: Display date of report execution + 1 day
Post by: sanchoniathon on 28 Sep 2009 01:31:55 PM
In deed that worked correctly ...

1- I create a ne DATA items with the following expression:
   _add_days ( current_date ; 1)

2- I added a singleton object to my report's header section poiting to the query that contains my newly created DATA ITEM

3- Drag and dropped the newly created data item into the newly created singleton and it works fine ...

thanks for your support !