COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: sspk on 20 Mar 2008 02:50:15 PM

Title: scheduling a report
Post by: sspk on 20 Mar 2008 02:50:15 PM
Hi All,
  I have a report with  5 prompts(4 are optional),Now i want to schedule that report where the prompt(date prompt) that is not optional should take the systemdate as the parameter value and should run (if the system date matches the value of that particular date).Any Ideas will help me a lot.
                                                                             Thanks
Title: Re: scheduling a report
Post by: praveennb on 25 Mar 2008 08:57:32 PM
You could add a static choice named CurrentDay with a Default Value 00 to the date prompt (?prmday?).
schedule the report to run with the CurrentDay as default value.

then inside your query filter add a case condition, similar to this.

[query].[transdate] = case when ?prmday?='00' then convert(char(10),getdate(),101) else ?prmday? end

convert(char(10),getdate(),101)   i have used SQL server date function here to get the current date, you can replace this with your database or Cognos date function.

The above report will run based on a schedule, without checking for any conditions.



If you need to run the report based on a schedule and condition like system date matches the transaction date in query value, then use the Event studio to trigger the report.

hope this helps.