COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: m shea on 05 Mar 2014 09:10:59 AM

Title: Hide and Print Text Values
Post by: m shea on 05 Mar 2014 09:10:59 AM
Hi,
I have reports with dropdown prompts, and text describing the prompt, displayed on the results page so user can easily change the filters without re-running.  When the results are exported to Excel, the prompts are hidden and I have hidden the text from Excel.
What I would like to do is present a text value of the prompts in Excel so the user can better understand what filters have driven the Excel sheet they're working with.
Is this possible?

Thanks in advance.
Title: Re: Hide and Print Text Values
Post by: Lynn on 05 Mar 2014 09:14:49 AM
Have you tried ParamDisplayValue() or ParamValue() as layout calculations? You could conditionally render those so they only appear in the Excel output.
Title: Re: Hide and Print Text Values
Post by: m shea on 05 Mar 2014 09:23:03 AM
Hi,
I have tried the ParamDisplayValue which displays the text great.  But how do I conditionally render that text to not display on screen and only display in Excel?  (So as to not double the information on the screen with both the text and the prompt.)

Thanks again.
Title: Re: Hide and Print Text Values
Post by: navissar on 05 Mar 2014 09:24:36 AM
Just wrap the whole thing up in a block and give it a render variable using reportOutput() function, and you should be good to go.
Title: Re: Hide and Print Text Values
Post by: Michael75 on 05 Mar 2014 09:33:33 AM
Such as this:

Variable name: Is_HTML
Variable definition: ReportOutput() = 'HTML'

If condition is satisfied, don't display.

(../..)

Sorry Nimrod, I'm not jumping on your (illustrious) bandwagon, but my reply to m shea was 90%drafted when I noticed that....... you get the rest  :)
Title: Re: Hide and Print Text Values
Post by: m shea on 05 Mar 2014 09:42:25 AM
Perfect!

It works like a charm.  I was unaware of the ReportOutput function.

Thanks,
m
Title: Re: Hide and Print Text Values
Post by: Michael75 on 05 Mar 2014 10:05:46 AM
m

I agree, ReportOutput () is not well-documented at all. Here:

http://www.ironsidegroup.com/2013/03/05/report-studio-cookbook-formatting-based-on-report-output/ (http://www.ironsidegroup.com/2013/03/05/report-studio-cookbook-formatting-based-on-report-output/)

is an article which will show you some of its possibilities. And in general, one can learn a lot from following the Ironside blog. I certainly have found it useful.
Title: Re: Hide and Print Text Values
Post by: m shea on 05 Mar 2014 11:31:31 AM
Thanks for the link.  I need to spend some time reviewing the Ironside Group site and all those functions buried in Report Studio.

Thanks again for all help.