Hi Katarzyna,
Maybe something with the PageName() function. Try the functions below. This should work.
I have a report with a prompt with static choices 1,2,3 for page 1,2 or 3. This is a required prompt (variable pPage) with a default selection of 1.
Then the render variables on the pages are boolean variables.
For page1: bPage1 with a definition of ParamValue ( 'pPage' ) = '1'
For page2: bPage2 with a definition of ParamValue ( 'pPage' ) = '2'
For page3: bPage3 with a definition of ParamValue ( 'pPage' ) = '3'
------------------------------
Thomas van der Meer
------------------------------
Original Message:
Sent: Fri March 19, 2021 11:53 AM
From: Katarzyna Karpińska
Subject: Expression for render variable does not work
I have a report with 4 pages formatted as tabs. Each tab has a different name and contains a list table. I would like to list tables to render only when the tab it is on, is chosen. I created a variable to be used as render variable for the list table. I tried both boolean and string variables. If I put in the boolean variable an expression, for example "PageName()='MyFirstTabName', when I go to the first tab the list table does not appear at all. If I put in the variable expression "1", then the list table renders. To check if this is a problem somehow of string format, I tried putting also "character_lenght(PageName())=name_number". I also tried similar but with string variable, as well as I tried to use if else clause in the expressions. Nothing works. Does any of you know what could cause this problem?
------------------------------
Katarzyna Karpińska
------------------------------
#CognosAnalyticswithWatson