COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: jabs on 02 Dec 2015 11:00:13 AM

Title: Select Page to Run based on Table Value
Post by: jabs on 02 Dec 2015 11:00:13 AM
Hi all - I'm going to be using a table that is truncated and loaded every hour. The outage is short, but during the load a "status" table will report that the table is off-line.

When a user runs the report, I want the report to check the table value. If "OK", then run the main report. If "Not Now", then run a different report containing some text that says "Please try again" (or some other notification).

What is the best way to accomplish this?
TIA,
Joe
Title: Re: Select Page to Run based on Table Value
Post by: Lynn on 03 Dec 2015 02:29:26 AM
Create the report page as well as another page with the "try again" message on it. Set a render variable on each to only render based on the value from the status table. There are multiple ways to accomplish this. Create a string variable based on the field from the status table and then set that variable as the render variable on the two pages, rendering the real report page for the OK scenario and rendering the try again page for the Not Now scenario. Two separate Boolean variables could also do the trick.
Title: Re: Select Page to Run based on Table Value
Post by: jabs on 10 Dec 2015 12:01:38 PM
Thank you Lynn. Good idea.