If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

SOLVED: Render Report Page Based on Prompt

Started by bonniehsueh, 31 Jul 2017 05:37:42 PM

Previous topic - Next topic

bonniehsueh

I am trying to render report pages based on a prompt. The prompt values are static choices are summary, detail. For simplicity, I use a boolean variable.

Created a variable with expression: ?pReportType? = 'summary'

When true, then page 1 should show, when false page 1 should not show. I get the error below.

The following expression is not valid: ?pReportType? = "all". If the item exists in a query but is not referenced in the layout, add it to a property list. CRX-API-0005 An error occurred at or near the position '0'. The variable named '?pReportType?' is invalid.

I've tried adding the prompt to each pages and setting the prompt default value. For example, for the summary page, ill set the default value to 'summary'.  This should meet the variable condition. 
Also assigned the pages to a query and created a calculated data item with the values hard coded so that I can add it to the property list of the query. 

I have done this in the past and for some reason is not working for me anymore. 

Any suggestions appreciated!

johnwilkinson

You're making it more complicated than it needs to be. Make it a string variable with possibilities "page1" and "page 2". Create a variable with "ParameterValue(paramname)". Assign render variable to the pages - tick the page 1 value for page 1, page 2 value for page 2


Sent from my iPhone using Tapatalk

bonniehsueh

Thanks for your quick response John!! Was writing an update with the solution just now. You hit it on the head! Just had to change the variable expression to paramvalue(pReportName) instead of ?pReportName? = 'summary'.  None of the other techniques were necessary.