COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Bindiya on 01 Jun 2012 11:28:10 AM

Title: Is there any upper limit for ParamDisplayValue function?
Post by: Bindiya on 01 Jun 2012 11:28:10 AM
We want to display the prompt selection made and if no value is selected we need to display 'ALL'.

We used the below expression:
case when ParamDisplayValue('Parameter1') is missing then 'ALL' else ParamDisplayValue('Parameter1') end

We have around 1645 values in prompt. When i select around 1640 values it is just displaying "--" instead of displaying all those 1640 values. If i select few values then it is working fine.
Is there any upper limit for ParamDisplayValue function??

To over come this i just displayed the dataitem in report and also a text item 'ALL'. I conditionally hide them.
Expression used in variable : "ParamDisplayValue('Parameter1') is missing".

But when i run report now by selecting 1640 values it is throwing an error.
Error: Failed to evaluate expression: 'ParamDisplayValue('Parameter1')...

Can some one help me out?
Title: Re: Is there any upper limit for ParamDisplayValue function?
Post by: Lynn on 01 Jun 2012 11:53:55 AM
I think ParamDisplayValue is something you can only use in a layout calculation.

Why not just make another query that uses your parameter to return all the choices and use a list or repeater to display the values?
Title: Re: Is there any upper limit for ParamDisplayValue function?
Post by: Bindiya on 01 Jun 2012 12:31:13 PM
Thank you Lynn for your reply.

It actually is a layout calculation which worked fine for other prompts that had few values (around 100). But for prompt which has many values (and select all of them) it was not working fine.

Reteater helped. But just want to know if paramdisplay had any limit.

Title: Re: Is there any upper limit for ParamDisplayValue function?
Post by: Bindiya on 01 Jun 2012 01:04:58 PM
If i use repearter , then if the prompt is not selected even in that case it is displaying all the values. I want word 'ALL' to be shown in that case.
Title: Re: Is there any upper limit for ParamDisplayValue function?
Post by: Lynn on 01 Jun 2012 02:37:51 PM
I think I gave you the wrong information originally about using param functions only in layout calculations. I'll blame Friday for that gaffe.

If you go back to using a variable as the approach to achieving what you are after, maybe try using paramCount instead and checking for zero. You mentioned an error using paramDisplayValue but you didn't indicate what the error was.

Using a data container to show the results with the added requirement of "ALL" for nothing selected gets a little more complicated since the prompt is obviously optional. You could make it required and add a static choice for ALL, but seems more work than going with your original idea.
Title: Re: Is there any upper limit for ParamDisplayValue function?
Post by: Bindiya on 01 Jun 2012 05:07:03 PM
Yes Lynn...
I tried using Paramcount too. When selected many prompt values (around 4000 - not a select all) it was displaying '--' instead of diaplaying the selection made.

Issue is, when few values are selected from prompt all functions seem to work (ParamDisplay & Param Count) when selecting maaany values it doesnt.

Anyways, i dont think displaying all the 4000+ values will ever be useful for enduser.
Title: Re: Is there any upper limit for ParamDisplayValue function?
Post by: Bindiya on 04 Jun 2012 09:55:22 AM
Here is the solution which worked.
I used a repeater to display all the values selected in prompt (as ParamDisplay is displaying '--').
This repeater is rendered based on a variable (ParamCount('Parameter1')>0).

-Diya