COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => COGNOS Connection => Topic started by: RiRo on 03 Jul 2014 08:13:07 AM

Title: Scheduled Email Report with overwriten Parameters
Post by: RiRo on 03 Jul 2014 08:13:07 AM
Hi

We made a Report which has two Parameters which have a Default selection.

The first Parameter is the last period, which is a date string in Format "YYYY-MM".
The second Parameter is a Company Name.

So now I want to schedule this reports for each Company, and the only one Parameter which should be overwritten is the Company Name,
but this doesnÄ't work because I have to overwrite both Parameters.

Is there a way to only Change the Company Parameter without the period Parameter?

One Thing I had considered is the use of Java script, to enable a calculated datestring with Name lastPeriod,
but I'm not experienced with JavaScript and cognos, but maybe someone has a short example for this issue or
a link to an useful documentation for noobs :-)

Thnaks
Rob
Title: Re: Scheduled Email Report with overwriten Parameters
Post by: Bark on 03 Jul 2014 09:19:42 AM
How do you "overwrite" the parameter? Bursting?

In any case, if you use a macro function for the parameter instead of the ?x? version, you can define a default if empty. Now make the prompt optional and run the report only setting the Company Type. The default will be picked up from the macro instead of the default selection of the prompt.

e.g. Filter: [REPORTING MONTH] = ?pLastPeriod? (and you have a default in the prompt page for '2014-07')
Change to [REPORTING MONTH] = #prompt('pLastPeriod','string','2014-07')#

Bear in mind that with this option, if nothing is selected, the parameter will still be empty so things like "ParamDisplayValue()" will not work.

Hope it helps.

Regards,

Bark