Hi
I have two date prompts "Start Date" and "End Date". When i run the report it should be optional parameter. If a user selects "Start Date" the "End Date" should become required parameter and vice versa.
User should select both together. So the query filter will be either optional or required
Can anyone help me with the javascript for this?
Just set the date filter(s) as optional in the query. When the report is run, the user will be prompted to select the date, if he selects, the report will run for the selected dates, if he doesn't select any date, date filter will not be applied (as expected). It is the default behaviour..
Regrads
Prasan
I guess my question was not clear. What the user wants is when they run the report the date prompts should be displayed as "optional" parameters. But if they select any one date i.e "Start Date" or "End Date" the other date parameter should become required prompt.
e.g if he selects "Start Date" End Date should become required field in the prompt page.
i.e user should select both or none. He cannot select any one alone.
Wanted to know if this can be done using javascript. Please let me know. I need it in cognos 8.4 version
Hi Reshma,
The only way i think of doing it without using javascript is by using 2 prompt pages and a reprompt. I have created a report against the GoSales Query Package.Spec is attached.
Cheers
Prasan
You can use a single date range prompt. It defaults to earliest and latest date, effectively giving you the same thing without any need for risky ( from a maintenance perspective) JavaScript.