COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: MikeG on 25 Feb 2015 09:07:03 AM

Title: ParamDisplay after using a default selection in Prompt
Post by: MikeG on 25 Feb 2015 09:07:03 AM
Hi,

    I have a prompt to select a report by Year. So it always opens with the current year I put the MUN of the current year into the Default selection of the Prompt properties. All works ok.

However, in the Report Title I have a ParamDisplay to show the prompt selection, with the default selection in use I get the whole of the MUN displayed in the title rather than just 2015. Is there any solution to this that anyone has resolved?

thanks
Mike
Title: Re: ParamDisplay after using a default selection in Prompt
Post by: bdbits on 25 Feb 2015 04:19:36 PM
It might be a typo, but you probably want: ParamDisplayValue('yourparametername')
I see the MUN when I use ParamValue().
Title: Re: ParamDisplay after using a default selection in Prompt
Post by: MikeG on 26 Feb 2015 01:57:45 AM
Hi

Yes I have been using  ParamDisplayValue('Parameter1')
Title: Re: ParamDisplay after using a default selection in Prompt
Post by: Robl on 26 Feb 2015 06:37:34 AM
It's a bit of a bug/feature.

The prompt has a default 'use value' but there's no way to set a default 'display value'.

The best workaround I know is to but the paramdisplayvalue function into an 'if' statement.

So,
if paramvalue = 'yourdefaultvalue'
then defaultdisplavalue
else paramdisplayvalue(?param?)
Title: Re: ParamDisplay after using a default selection in Prompt
Post by: MikeG on 27 Feb 2015 02:20:30 AM
Thanks Robl

I used this method