COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Report Studio => Topic started by: sathish_cognos on 25 Mar 2011 05:32:20 AM

Title: Paramdisplayvalue and paramvalue !!!
Post by: sathish_cognos on 25 Mar 2011 05:32:20 AM
what is the difference between Paramdisplayvalue and paramvalue ???

paramdisplayvalue - returns a string of the parameter display value of the variable.
paramvalue - returns a string of the parameter value of the variable.

so if we use two both together the returning value would be same, is there any specific usage for that !!! thanks ??? ???
Title: Re: Paramdisplayvalue and paramvalue !!!
Post by: Arpitagrawal9 on 14 Jun 2011 01:51:35 AM
Hi Sathish,

Please find below the details
ParamDisplayValue() - Displays the value of 'Display Value' item (Value Prompt Property)
ParamValue() - Displays the value of 'Use Value' item (Value Prompt Property)
So suppose you create a parameter called product in your report Which can be based on ProductID/ProductName
So using Paramvalue() you can filter out data of your report based on product the same can also be ac hived using display value,But as filtering on character field impacts on report performance you should go with ParamValue in this case.
Param Display value can be very usefull for creating Layout calculations


Hope this helps:)
Title: Re: Paramdisplayvalue and paramvalue !!!
Post by: MrTy on 28 Sep 2011 08:05:09 PM
Why does paramDisplayValue sometimes not display the display value, but the value to use?  I have that situation right now with a report.  The query the prompt (an inline prompt) is based on uses a query that returns;

Use     Display
045     WCH

The prompt displays 'WCH.'  However, when I add a text field and use ParamDisplayValue(?prompt1) it returns '045'

What gives?  This result is inconsistent among my reports.
Title: Re: Paramdisplayvalue and paramvalue !!!
Post by: MrTy on 29 Sep 2011 09:22:32 AM
I figured this out.  It was not properly loading the display value because the inline prompt had a default value.  Once the prompt value is changed or a reprompt executed, it displays correctly.

If one wants to use a default value on inline prompts, there is a way to have it display properly when initially rendering the report.