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

Show and Hide the prompts

Started by Sarayucog, 13 Jan 2011 07:53:26 AM

Previous topic - Next topic

Sarayucog

Hi All,

I have report, that report page will contains prompts, List and chart objects. When I am running the report after selecting the values in prompts also those prompts are still displaying.

My problem is I need two buttons with the names SHOW and HIDE. If I click on the SHOW button it should display the prompts. If I click on the HIDE button it should hide all the prompts.

I will wait for your great answers.

Thanks in advance

RobsWalker68

Hi,

Have a look at using Conditional blocks to do this.

There is some good information with examples in the Report Studio User Guide.  Go to Chapter 13 - Using conditions and then look at the section on "Hiding and Showing Objects"

Hope this helps

Kind Regards

Rob


Arsenal

Sarayucog, as soon as you start talking about fancy buttons and clickety-click's then you're entering the realm of Javascripts.

I THINK what may work is a combination of JS and RobsWalker's suggestion of a conditional block. So, you'll create a conditional block and corresponding variable. You'll also create a hidden text box prompt whose parameter will be the same as the conditional block's variable. You'll see the default value of the text box as per whether the report should be loaded up with prompts hidden or showing.
Then

1) With block variable set to YES, add your prompts in the block (use tables for neatly aligned prompts) and then at the bottom (but still within the conditional block) add a JS code for a button. The JS code should include a line such as document.formWarpRequest._textEditBoxABCD.value ='NO' along with a SetPromptControl('reprompt'); which basically means that when the button is clicked, the JS will update the hidden text box's value to NO so that on the reprompt part, the conditional block kicks in and displays the NO part of it

2) With block variable set to NO, add in just the JS code for a button as in 1 (but without the prompts of course) but this time the text box's value should be set to YES so that when the button is clicked, the YES part of the condiitonal block kicks in and shows the prompt