COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Business Insight / Cognos Workspace => Topic started by: tjohnson3050 on 14 Aug 2012 10:15:23 AM

Title: Dynamic Prompt Value Display in Cognos BIA
Post by: tjohnson3050 on 14 Aug 2012 10:15:23 AM
Background:
A common report requirement is to display values chosen at runtime for a report on the actual report.  The difference between Cognos Query Studio and Cognos Business Insight Advanced (BIA) is Cognos Query Studio by default inserts a text item into a report header to display the dynamic values chosen at run time for a prompt, BIA does not automatically display prompted filter values on a report.

Since BIA uses the same report definition as Report Studio, we can take advantage of the clipboard fragment feature to overcome some of the limitations of BIA.

Work Around:
Assuming you start with a report you have created in BIA with a filter that is set to "prompt for values when report is run", you can use an XML Clipboard Code Fragment to display the prompt selected values.   Use the following code fragment:

<RSClipboardFragment version="2.0"><textItem><dataSource><reportExpression>ParamDisplayValue('PARAMTER_NAME')</reportExpression></dataSource></textItem></RSClipboardFragment>

1.   From notepad (or any text editor) replace PARAMETER_NAME in the above fragment with the name you gave in BIA for the parameter, select the text and copy (to windows clipboard) i.e. SomeParameterName.

2.   From BIA, switch to Page Design view, select the report header and choose Edit – Paste To – then Insert inside and click ok.
Title: Re: Dynamic Prompt Value Display in Cognos BIA
Post by: Lynn on 14 Aug 2012 11:44:11 AM
That is a great workaround! I've had my users create a separate layout container in the header and reference the same parameter to populate it, but I like your idea better!
Title: Re: Dynamic Prompt Value Display in Cognos BIA
Post by: tjohnson3050 on 14 Aug 2012 03:18:24 PM
Thanks Lynn!  I'm trying to get my Applauds up closer to yours :)  Takes a while....
Title: Re: Dynamic Prompt Value Display in Cognos BIA
Post by: Lynn on 14 Aug 2012 03:22:22 PM
I'm very bad about giving applause when they are called for so I just gave you one :)

You certainly post up a lot of good information and deserve way more than you've got!
Title: Re: Dynamic Prompt Value Display in Cognos BIA
Post by: charon on 29 May 2013 04:35:51 AM
I totaly agree and therefore, i just added one more : :P
Title: Re: Dynamic Prompt Value Display in Cognos BIA
Post by: jeeva on 12 Jul 2015 04:51:01 AM
Quote from: tjohnson3050 on 14 Aug 2012 10:15:23 AM
Background:
A common report requirement is to display values chosen at runtime for a report on the actual report.  The difference between Cognos Query Studio and Cognos Business Insight Advanced (BIA) is Cognos Query Studio by default inserts a text item into a report header to display the dynamic values chosen at run time for a prompt, BIA does not automatically display prompted filter values on a report.

Since BIA uses the same report definition as Report Studio, we can take advantage of the clipboard fragment feature to overcome some of the limitations of BIA.

Work Around:
Assuming you start with a report you have created in BIA with a filter that is set to "prompt for values when report is run", you can use an XML Clipboard Code Fragment to display the prompt selected values.   Use the following code fragment:

<RSClipboardFragment version="2.0"><textItem><dataSource><reportExpression>ParamDisplayValue('PARAMTER_NAME')</reportExpression></dataSource></textItem></RSClipboardFragment>

1.   From notepad (or any text editor) replace PARAMETER_NAME in the above fragment with the name you gave in BIA for the parameter, select the text and copy (to windows clipboard) i.e. SomeParameterName.

2.   From BIA, switch to Page Design view, select the report header and choose Edit – Paste To – then Insert inside and click ok.


Hi,

good workaround. As a developer we can do this, but is there any way to add filters in report for Adhoc users.

Thanks
Title: Re: Dynamic Prompt Value Display in Cognos BIA
Post by: Lynn on 13 Jul 2015 06:56:32 AM
Quote from: Thanay on 12 Jul 2015 04:51:01 AM

Hi,

good workaround. As a developer we can do this, but is there any way to add filters in report for Adhoc users.

Thanks

I assume you mean adding the parameter display layout calculation onto the report and not the creation of the filter itself. Of course business users can easily add filters using workspace advanced.

First, I've had business users use the clipboard fragment technique. You need to document it very well for them.

Second, newer versions of workspace advanced allow the GUI to be customized. If you can add the layout calculation item to the toolbox then users could just drag it in. I've never done the GUI customization so I can't say for sure on that point but perhaps worth exploring.
Title: Re: Dynamic Prompt Value Display in Cognos BIA
Post by: MFGF on 14 Jul 2015 04:01:57 AM
Quote from: Lynn on 13 Jul 2015 06:56:32 AM
If you can add the layout calculation item to the toolbox then users could just drag it in. I've never done the GUI customization so I can't say for sure on that point but perhaps worth exploring.

Yep - you certainly can. Any functionality from Report Studio is up for grabs :)

MF.
Title: Re: Dynamic Prompt Value Display in Cognos BIA
Post by: jeeva on 14 Jul 2015 05:30:59 AM
Thanks to all .... :)