COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: johny.cbi on 03 Aug 2010 09:49:50 AM

Title: Report Prompts
Post by: johny.cbi on 03 Aug 2010 09:49:50 AM

Cognos 8.4/Report Studio/ Data Base : Tera Data

I have 2 propmts in prompt page Product and supplier

Case 1 :  select product and supplier is optional

Case 2 : Select Supplier and Product is optional

as soon as prompt page opens user has to select supplier or Product Prompt, then only prompt page allows for finish button
one selction is mandatory whether supplier or Product


case 3 : If we don't select supplier or Product -- finish Prompt button has to disable
(The prompt page should not allow for further step)

Title: Re: Report Prompts
Post by: Arsenal on 03 Aug 2010 11:11:44 AM
perhaps someone else can also chime in, but seems like in your case only some sort of a Javascript can help.
Title: Re: Report Prompts
Post by: JGirl on 03 Aug 2010 08:12:36 PM
Could you start with a static choice radio button asking for a choice between product or supplier, then another prompt (data driven) which is conditionally populated with different data items depending on what is selected in the first radio button prompt (you'd also need a conditional filter)?
Title: Re: Report Prompts
Post by: Lynn on 04 Aug 2010 06:55:11 AM
If you add a static choice for product such as *ALL PRODUCTS* and then a static choice for supplier such as *ALL SUPPLIERS* then both prompts can be mandatory. You'd have to account for those static choices in your filter expression.

Essentially they don't have to pick a specific product but could choose all. Of course this means they could choose the all option for both prompts which is probably not what you want. In that case you could make the filter expression return no data and then use a no data handler that detects this and provides a message instructing them about this.

I realize this isn't exactly the type of behavior you were looking for, but perhaps another avenue to consider...
Title: Re: Report Prompts
Post by: johny.cbi on 04 Aug 2010 09:27:15 AM
could you please send me the Java script if any of you has idea on this ? appreciated for your answers
Title: Re: Report Prompts
Post by: tupac_rd on 04 Aug 2010 09:57:30 AM
does this help
http://www-01.ibm.com/support/docview.wss?rs=3442&context=SS9RTN&q1=%2bjavascript&uid=swg21388290&loc=en_US&cs=utf-8&cc=us&lang=all
Title: Re: Report Prompts
Post by: johny.cbi on 04 Aug 2010 10:29:48 AM

Not really ....
Title: Re: Report Prompts
Post by: tupac_rd on 04 Aug 2010 10:39:23 AM
how'bout this

http://www-01.ibm.com/support/docview.wss?rs=3442&context=SS9RTN&q1=%2bjavascript&uid=swg21398683&loc=en_US&cs=utf-8&cc=us&lang=all
Title: Re: Report Prompts
Post by: Steve-O on 04 Aug 2010 03:39:37 PM
Radio button to select by supplier or product.  Based on this selction, display conditionally formatted prompts.
Prompt set one is visible when radio button one is selected.  It has supplier as required and product as optiona.
Prompt set two is visible when Button two is selected.  It has product required and supplier optional.
Run button for both prompts is active when the required prompt is satisfied.

You should be able to have the filters in the report as both optional.

Should work, just did something similar this week.