Chapter 7
Unleash the Power of Cognos with Macros, HTML items, and JavaScripts
Section 1
Dynamically Changing Report Columns Using Macro Functions
Normal 0 false false false EN-IN X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin-top:0cm; mso-para-margin-right:0cm; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-fareast-language:EN-US;} This video shows you how to enable users to select the columns they would like to see on the report. We will use the PROMPT macro function to achieve this. - Start with a list report and drag fixed columns - Drag possible data items to the query - Create calculated data items and use the #prompt()# macro in them to achieve dynamic selection - Create prompts to pass data item names to the dynamic columns - Use the data items on the reports