This video will demonstrate how to use a prompt macro, case statements, a prompt control with static choices, and conditional formatting to dynamically control which columns are displayed in a report and how they are displayed.
The syntax used in this technique is provided below.
Prompt Macro Syntax
#prompt('Report Type', 'token', '[Sales].[Order Method].[Order Method]')#
Case Statements Syntax
Details Column
Case
When (?Report Type? = '[Sales].[Order Method].[Order Method]') then ([Sales].[Products].[Product Line])
When (?Report Type? = '[Sales].[Products].[Product Line]') then ([Sales].[Products].[Product Type])
Else ([Sales].[Products].[Product Description])
End
Measure Column
Case
When (?Report Type? = '[Sales].[Order Method].[Order Method]') then ([Sales].[Sales].[Quantity])
When (?Report Type? = '[Sales].[Products].[Product Line]') then ([Sales].[Sales].[Revenue])
Else ([Sales Target].[Sales Target].[Sales Target])
End
For more IBM Cognos Proven Practices content, please visit http://www.ibm.com/developerworks/data/library/cognos/cognosprovenpractices.html
Nice vid! More please. :-)
scarrrrr77 9 months ago