COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: RobSil on 28 Jan 2010 11:11:02 AM

Title: Setting date range based on Params?
Post by: RobSil on 28 Jan 2010 11:11:02 AM
My report is a monthly report... you say what month by passing in a param...

?MonthParam?
    - allowed values are "ThisMonth", "PrevMonth", "CustMonth"

If custom month, then I look to optional params,
?SpecMonth?
?SpecYear?

I'd like to somehow check the params and set params to be used for date range in my query... is this possible?

That is... if the value is PrevMonth... I set ?StartDate? and ?EndDate? one way, Custom month, another.  I can handle the expression properly... but not sure if you can set the value of parameters in the report vs. passing them in? 

Thanks,
Rob
Title: Re: Setting date range based on Params?
Post by: paddhu on 29 Jan 2010 12:02:45 AM
The only way of passing values to parameters is by drill through, or prompt controls. Unless you decide you can go for JavaScript.