COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: rcaesar on 11 Feb 2010 09:15:27 AM

Title: Using Radio buttons
Post by: rcaesar on 11 Feb 2010 09:15:27 AM
Hi again,

I am looking at this scenario:

Want to run two or more reports using radio buttons.

This is what I am thinking (to test it out)

Create 2 reports, each placed in a separate Report Page.
Create a Value Prompt on the prompt page, with values 'Run Report 1' and 'Run Report 2'
Reference the selected report by referencing the Report Page in the Prompt(?)
Then convert the UI to a Radio Button Group.

The alternative, is to use JavaScript.

Does this sound doable?
Thanks again for any suggestions.

Title: Re: Using Radio buttons
Post by: MFGF on 11 Feb 2010 09:46:30 AM
Hi,

I'd be tempted to use a single-page report with a conditional block, displaying either one "report" (list, crosstab, chart etc) or the other.  The conditional block could then be driven by a boolean variable based on the selection from the value prompt on the prompt page (with two static choices).

MF.
Title: Re: Using Radio buttons
Post by: rcaesar on 11 Feb 2010 10:03:27 AM
Thanks MF,

I didn't think of that angle (using conditional block). But, what if (which is what I will wind up with in the end), I have 4 reports?

Will a conditional block be able to handle 4 report alternatives? And can this be converted to a radio button group?

Title: Re: Using Radio buttons
Post by: MFGF on 11 Feb 2010 10:23:42 AM
Hi,

No - a conditional block will handle only two outcomes.

What about creating a report with four separate report pages and adding a Table of Contents on an introductory page to allow the user to navigate straight to the desired report page?

MF.
Title: Re: Using Radio buttons
Post by: rcaesar on 11 Feb 2010 10:30:13 AM
Thanks again MF,

I had actually thought of that. But a TOC seems like an overkill in this case, and the requirement is a radio button group (not even a dropdown).

Title: Re: Using Radio buttons
Post by: paddhu on 16 Feb 2010 11:32:40 PM
QuoteNo - a conditional block will handle only two outcomes.

Is this true? Coz' I have used Conditional blocks to display upto 6 various report types. The only thing, you have to use a String variable to drive the Conditional block. Please correct me if I am wrong.
Title: Re: Using Radio buttons
Post by: lindero on 17 Feb 2010 08:33:26 AM
no, a conditional block can handle several states of a report variable. It depends on the report variable definition.

If a report variable (type of string) has n possible results then the conditional block based on this variable can handle max. n+1 conditions.
Title: Re: Using Radio buttons
Post by: MFGF on 23 Feb 2010 07:19:00 AM
Yes - I stand corrected.  Mental note to self - check your facts before posting, MF!  :-[
Title: Re: Using Radio buttons
Post by: Bloomington on 25 Feb 2010 09:48:32 PM
You can create Render variable and assign the values to selected Radio Button values which takes you to the report you want based on the selection.

Thank You
Bloom.
Title: Re: Using Radio buttons
Post by: angela on 26 Feb 2010 12:32:42 PM
I actually prefer the solution of multiple pages over conditional blocks because with conditional blocks it's not always apparent when you open a report that there are hidden objects (the conditions that aren't the default).