COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: svj on 12 Dec 2012 07:44:08 AM

Title: Cognos - Report Studio - Common Functions - current_date
Post by: svj on 12 Dec 2012 07:44:08 AM
Hi!

I need to generate a report for some date in the past. However the report uses current_date parameter in several places making it hard for me to use _add_days(current,number) in order to alter current_date. Is there a way to manipulate current_date for a specific report without using cognos configuration?
Title: Re: Cognos - Report Studio - Common Functions - current_date
Post by: blom0344 on 12 Dec 2012 08:20:19 AM
The _add_days function does not alter the current_date the way you expect. It is just a function applied to data, not an adjustment of the date setting..
Title: Re: Cognos - Report Studio - Common Functions - current_date
Post by: RKMI on 12 Dec 2012 01:10:13 PM
Hi,

I agree with blom; only way would be to change the parameters as needed where the current date is being references and replace it with a data item which will be a prompted value for date selection.

And if you still need the current date to also to work you would need to give it a optional prompt so that if user doesn't pick a date or you will default back to current date.

Thanks,
RK