COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Jana18 on 05 Oct 2012 12:46:31 PM

Title: Setting permissble value prompt choices from previous prompt page user selection
Post by: Jana18 on 05 Oct 2012 12:46:31 PM
Hi,

Consider the following:

I have two prompt pages, in the first prompt page I have two value prompts both with permissible value ranges of 0 to 10.  On the second prompt page I have another value prompt.
For the value prompt on the second page I would like to dynamically render the permissible values based on user selection from the value prompts on the first page.

Example:

Prompt Page 1

Value prompt 1->Select Value->4
Value prompt 2->Select Value->2

Prompt Page 2

Value prompt – Possible values:

•   C1
•   C2
•   C3
•   C4
•   O1
•   O2

"C<number>" refers to selection made on Prompt page 1.Value prompt 1
"O<number>" refers to selection made on Prompt page 1.Value prompt 2


How best do I achieve this in Report Studio?  The only way to accomplish this I can think of is to possibly use JavaScript, but ideally it would be good to implement this using native Report Studio functionality.

Many Thanks
Title: Re: Setting permissble value prompt choices from previous prompt page user selection
Post by: pricter on 05 Oct 2012 01:33:23 PM
Assuming that the prompts are feed from data items and there are not static choices and filter
the query of the third prompt by the parameters of the two others prompts.

([Data Item Prompt 3] in (?Parameter1?)) or ([Data Item Prompt 3] in (?Parameter2?))

Title: Re: Setting permissble value prompt choices from previous prompt page user selection
Post by: Jana18 on 05 Oct 2012 02:26:58 PM
Thanks pricter, however the value prompts on the first page are static choices, 1 to 10 numbers.  With that confirmed do you have any alternatives to a JavaScript based solution?

Thanks again.
Title: Re: Setting permissble value prompt choices from previous prompt page user selection
Post by: pricter on 05 Oct 2012 02:32:18 PM
The third prompt the one in the second prompt page being feed by static choices or data item?
Title: Re: Setting permissble value prompt choices from previous prompt page user selection
Post by: Jana18 on 05 Oct 2012 03:28:19 PM
Sorry for not being clear, but the third prompt on the second page is NOT fed from either data item or static choice, the whole point being that I want to feed the values dynamically somehow from what the user selects from the value prompts on page one.

Does this help in understanding my problem?

Many Thanks
Title: Re: Setting permissble value prompt choices from previous prompt page user selection
Post by: pricter on 05 Oct 2012 03:57:26 PM
In my view you should some how feed the third prompt by a data item which would include both the static values from prompt1 and prompt2.

The only ways that I can think that you can achieve that is
1) By unions (if each prompt has 10 values you would need 20 unions)
2) By loading this data using excel (fortunately in Cognos 10 you can do that see external data)
Title: Re: Setting permissble value prompt choices from previous prompt page user selection
Post by: MFGF on 08 Oct 2012 03:23:42 AM
I have seen a technique for this that uses a "virtual table" in the query of the prompt on the second page. By "Virtual table", what I mean is a SQL query that returns specific literal values based on the parameter(s) from the first page (used in prompt macros).

Cheers!

MF.