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

Hide Columns on reports

Started by ATL, 31 May 2012 09:14:36 AM

Previous topic - Next topic

ATL

Hello,

I'm creating report that has a list with roughly 20 columns.  I'd like the list to only display 5 columns when the report is initially loaded, but for the user to have the option to show more columns.

Ideally I'd like to have a listbox or a group of checkboxes that are populated by the column names.  After the user loads the initial report with 5 columns, they can interact with the list/checkboxes to specify which columns they'd like to see on the report.  After selecting the columns they would hit some sort of prompt button that could un-hide any columns that were previously hidden.

I've messed around with prompt pages and conditional blocks but have been unable to come up with anything so far.  I'd like to avoid using javascript if possible.

Thanks in advance!

Lynn

I'm sure this has been covered a few times in the forum already and there are a few different ways to go about it.

I suggest conditional styling or conditional rendering. You can create a prompt control with static choices for the optional columns. Then create an advanced conditional style for each optional column or else create a variable to use for conditional rendering.

ATL

Thanks for the response.  I've been trying to use conditional styling and rendering but nothing is getting me to the correct result. 

I'm newer to Cognos, if you could expand on your previous post or point me in the direction of other forum posts that would be much appreciated.

Thanks

wyconian

Hi

My preferred option for this would be to use conditional rendering (conditional formatting is an equally good way of doing it, guess it comes down to preferences).

To do that I'd set up prompts so the users can select what columns they want to see.  Then you'll need a boolean variable for each prompt.  The variables would be something like ?promptDisplayValue? = 'yes'  (assuming you have set static values for the prompt of yes and no).  The boolean variable will either equate to yes (true) or false (no).

Next on the report page click on the a column, in the properties box click on the render variable box and select render for yes.  Do that for all the columns you want to be optional.

The prompts could be placed on the actual report page in the header rather than on a separate prompt page so your uses can interactively choose which columns to se.  You'll need to have a reprompt button so the users can submit their selections.

Good luck.

Lynn

Yes, I agree either is a good choice. You will need a separate boolean variable for each column to be conditionally rendered. If you go with conditional styling, I'd use advanced conditional style (one per column) where you set the box type to none depending on how you write the condition.

If you describe how you have set up your prompting it would make it easier to give more specific instructions. Knowing what the parameters and use/display values you've created will help. You may have a separate parameter for each column or you may have one parameter that includes all choices in a multi-select control.

Here are a couple of examples of the conditional rendering approach.

http://publib.boulder.ibm.com/infocenter/c8bi/v8r4m0/index.jsp?topic=/com.ibm.swg.im.cognos.ug_cr_rptstd.8.4.0.doc/ug_cr_rptstd_id24530Example-CreateaConditionalReport.html

https://www.ibm.com/developerworks/mydeveloperworks/blogs/VICTips/entry/using_summary_values_for_conditional_rendering_in_paged_reports_in_cognos_report_studio1?lang=en

ATL

Thanks all for your replies, I ended up using a combination of your suggestions.  If anyone runs into this issue in the future, the link below provides an excellent example with step by step instructions:

http://www.ibm.com/developerworks/data/library/cognos/reporting/dynamic_report_design/page570.html?ca=drs-