COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: KANUL on 24 Oct 2010 09:14:56 PM

Title: Report output in Different format based on user selection
Post by: KANUL on 24 Oct 2010 09:14:56 PM
Hi every one...

I want to create a report in which I want to give the facility to the user (Drop Down or Radio Button) so that he can select the type of the report he want to see.
If he selects CSV, the report runs in CSV
If he selects PDF , the report runs in PDF

Can this be done without using Java Script?????

Thanks in advance.
Title: Re: Report output in Different format based on user selection
Post by: Lynn on 25 Oct 2010 06:50:01 AM
You can do it without Java Script by using drill throughs:

Create the report and prompt page as normal, except do not place a "Finish" button on the prompt page. Only a "Cancel" and "Next >" button are needed.

Create a second prompt page. This will render when the "Next >" button is chosen on the first prompt page. Place text objects on this page for all the output formats appropriate to present to the user. Including a "< Back" button is a good idea, but no "Finish" button is needed.

Select each text item and set up a drill through definition with the output that corresponds to the text label. Make sure the "Open in new window" option is unchecked and set up appropriate parameter passing
Title: Re: Report output in Different format based on user selection
Post by: KANUL on 27 Oct 2010 01:32:45 AM
Hi . Thanks for the report. but it will not give a prompt for selecting a report type i.e either PDF, HTML or EXCEL.
My user want to have a radio button for this.

Please let me know if you have any other solution for the problem which will provide prompt also.

Thanks
Title: Re: Report output in Different format based on user selection
Post by: s_chukka on 27 Oct 2010 06:37:19 AM
this can be acheived by using the render variable.
try to wrire the condition wit hteh case statement using the report output() funtion. create separate report pages for design the layout specific to the diffeent report output. Using the conditional style we can display based on the prompt value selected .
Title: Re: Report output in Different format based on user selection
Post by: Lynn on 27 Oct 2010 07:46:07 AM
Using a render variable or conditional block will only allow you to change the content that appears in the layout based on the output format selected -- it doesn't actually change the output format to something other than what was originally specified (e.g., via run with options or parameterized URL setting).

The approach I described relies on drill through back to the report itself with whatever output format the user selects. Drill throughs appear as a hyperlink and can't be applied to a value prompt as far as I know.

I realize a hyperlink interface is not a radio button and could be extraordinarily challenging for users to decipher :)