COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: ShwetalM on 07 Apr 2011 02:12:40 AM

Title: javascript to run(submit) prompt values in new page
Post by: ShwetalM on 07 Apr 2011 02:12:40 AM
Cognos Gurus,

I have a prompt page with multiple prompts in Report Studio (v8.4). "Finish" prompt button is used to run the report to Excel format by default. Pretty basic and straightforward so far. Except, when the report finishes running, you lose the prompt screen and users need to re-run the report if they need to make different prompt selections.

I need the prompt page window to remain as-is when you click the "Finish" button with the "report is running" message to appear in a new window. This way when the report finishes running to Excel, the prompt screen is still available if they want to re-run with different prompt selections.

Does anyone have a script handy for this functionality?

Thanks,
Shwetal
:)
Title: Re: javascript to run(submit) prompt values in new page
Post by: Sreeni P on 07 Apr 2011 02:43:20 AM
Quote from: ShwetalM on 07 Apr 2011 02:12:40 AM
Cognos Gurus,

I have a prompt page with multiple prompts in Report Studio (v8.4). "Finish" prompt button is used to run the report to Excel format by default. Pretty basic and straightforward so far. Except, when the report finishes running, you lose the prompt screen and users need to re-run the report if they need to make different prompt selections.

I need the prompt page window to remain as-is when you click the "Finish" button with the "report is running" message to appear in a new window. This way when the report finishes running to Excel, the prompt screen is still available if they want to re-run with different prompt selections.

Does anyone have a script handy for this functionality?

Thanks,
Shwetal
:)

Hi ShwetalM,

Have u tried Report inlay prompts?(Means u can define ur prompts on report page itself)
Title: Re: javascript to run(submit) prompt values in new page
Post by: ShwetalM on 07 Apr 2011 03:17:45 AM
My report's output format is MS Excel, so inlay prompts won't work.
Title: Re: javascript to run(submit) prompt values in new page
Post by: melee on 07 Apr 2011 10:37:03 AM
Unfortunately I don't think that you're going to be able to do this easily - it isn't going to be a matter of using a little Javascript to override a function. I like the idea of going inline first then rendering, but if it's not possible, you may have to get a little creative.

Here's a concept, probably very flawed but an idea anyway. You could manually POST your parameters to the report URL - this is essentially what COGNOS does when you hit the finish button, except it closes the prompt page. This would require AJAX, and I'm not even sure if it is possible, but it definitely works in theory.
Title: Re: javascript to run(submit) prompt values in new page
Post by: ShwetalM on 11 Apr 2011 07:07:45 PM
could you elaborate what happens when you click the finish button? If I can deconstruct that, then I could try to replicate that action with a script...