Purchase your Section 508 Compliance Support guide now!

Purchase your Section 508 Compliance Support guide now!

Cognos 8 -- dynamically change a report's datasource

Do you have an audit based report that you use for both your DEV and PROD environments, and you want to use the same report schema but have the flexibility to dynamically change your datasource connection?

You can use 'Prompt Macros' to allow the user to select the desired data source. The macro should be placed within each Query Subject.

From within Framework Manager, you should modify each Query Subject to replace the data source name to a prompt. For instance,

MODIFY

Select * from [GOSL].CONVERSION_RATE


TO

Select * from # prompt('Select Datasource','token') # .CONVERSION_RATE

When prompted for the data source name, you must enclose it in square brackets. i.e. [gosales]