COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: cognoisy on 14 Aug 2022 12:11:10 PM

Title: Render Report Page Based on Prompt Selection
Post by: cognoisy on 14 Aug 2022 12:11:10 PM
Hi,

I was wondering if anyone can help. Simmilar to this thread https://www.cognoise.com/index.php?topic=33391.0    I am trying to render pages visible depending on a prompt selected. I have followed the instructions in the thread above from 2017 (the user John Wilkinson particularly) but I am getting the following error message when validating the string:

When I input the string  ParameterValue('ManagerName')

The validation error message I get is:

RSV-VAL-0034 Failed to validate the variable String1.CRX-API-0011 The function name was not found at or near the position '14' in expression: "ParameterValue('ManagerName')"..



When I use ParameterDisplayValue instead: "ParamDisplayValue('ManagerName')

The validation error message I get is:

OP-ERR-0052 Tje expression operator 'ParamValue' is unsupported.


Any insight would help. Thank you in advance!

Title: Re: Render Report Page Based on Prompt Selection
Post by: cognostechie on 15 Aug 2022 01:21:35 PM
I don't have cognos available right now but I remember having done this so try this:

Case
  When ?ManagerName? = 'John Doe' then 'Yes'
  Else 'No'
End

By the way, what are you trying to do? Are you rendering pages to show limited data depending on who the manager is? If so, then you should use cognos macros to filter the data by applying data level security so that the same query and page can be used for all managers
Title: Re: Render Report Page Based on Prompt Selection
Post by: cognoisy on 21 Aug 2022 04:31:41 PM
Thanks Cognostechie! I found that this worked too:


QuoteParamDisplayValue('SELECT_MANAGER_NAME) = 'ManagerName'
Title: Re: Render Report Page Based on Prompt Selection
Post by: cognostechie on 22 Aug 2022 03:52:16 PM
Ah ! So the 'ManagerName' was the value, not the parameter name. The way you showed it in your original post made me think that was the parameter name !

Anyway, glad you got it working !