If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Disable the prompts according to the user selection

Started by karthik12345, 27 Apr 2016 04:27:10 AM

Previous topic - Next topic

karthik12345

Hi all,

   I am using two radio buttons T and C
   And below I created 2 value prompts for Tracing date (T) and Customer name(C).
   If the user click 'T 'button the cursor should go to tracing data value prompt and customer name prompt should be disable,
   And same if user clicks 'C'button the cursor should go to Customer name value prompt and Tracing date value prompt should be disable.
   How can I get the above requirement.

Thanks in advance
Karthee

navissar

This gets asked a lot, so here's a quick reference guide for the different approaches to this:
1. Use Prompt Pages: Put the first (Deciding) prompt in the first prompt page, and any dependent prompts in a second prompt page. Use a conditional block to render them based on a selection. Since in transition between pages a prompt value is submitted, the second page will only show the relevant prompt.
Advantages: Out of box, easy to implement. Disadvantages: Users feel that even though they pay an arm and a leg for cutting edge BI software, they get late 1990's interface, and they are right.

2. Use auto-submit: This will take some planning. Usually best done without a prompt page at all. So I'd set up the main report page like this:
Deciding prompt set to auto submit.
Then, a conditional block with the dependent prompts, where the block variable depends on the deciding prompt output. Also a submit button.
Then, a second conditional block with the report content, set to render only when either of the dependent prompts have values.
So the page loads up with just the deciding prompt, and upon selection the relevant dependent prompts are shown, and upon selection and submission - and the report data is revealed.

The advantages are that this is out of box functionality and the setup is clean and simple from the user's perspective. The disadvantage is that it may be a bit convoluted to set up and not even always possible. Still my hands-down favourite way to go.

3. Cascade it. If the scenario is as you described, you can create a query which will return all the different options together. Then, use that query as the query for the deciding and a dependent prompt. Use the built-in cascade functionality and essentially just filter the values of the second prompt based on the first selection. This is out of box, but as the same parameter and prompt are used for both might be a bit problematic to use down the line.

4. Use scripts. There are two main ways:
a. Create two reports, one for each scenario. In a third report, put the deciding prompt, and use the selected values of it to launch the relevant report in an iframe.
b. Use prompt API, specifically the setValidator() function, to manipulate the prompts based on selected values. You can disable, or hide, any irrelevant prompts. That would be my second favourite approach as it uses built in functionality.

HTH.

Lynn