I have come to realize that most people don’t understand what it means when a Report Studio Dynamic Report is written. For the most part, reports created in a Cognos Studio are already dynamic, as long as the data sources are regularly updated. This is because every time the report is open or run, it renders the most recent data from the data warehouse.
However, Report Studio has some really cool features you can incorporate into your reports without having to be a macro guru. One of my favorites is Dynamic Report Titles using a Layout Calculation. This will change the title of your report to match a prompt/filter. For instance, let’s say you run the same report each month for each division of your company. Instead of manually changing the filter and title for each division; or worse, creating the same report 10 times, you can create a prompt and have the report’s title change with the prompted data.
This is a two part process. First, we need to create a parameter and prompt; and second, use a Layout Calculation item in the title.
To start, drag a prompt item from the toolbox either into the report or onto the prompt page of the report. If using relational data, try using a Value Prompt. This allows your users to select from a list. If working with dimensional data, use a Tree Prompt. You will then be asked by the Prompt Wizard if you want to either create a new parameter or use an existing one. A parameter is just a fancy filter that works with your prompt.
For our example, we want to create a new parameter named pDivision. Connect to your package item and make sure in the operators box that you select “in”. This is sql speak for “I want to choose from all my options in this column”; aka, “I would like to be able to choose from all available divisions”.
Once you have created your prompt, drag a Layout Calculation item from the toolbox to the title area of the report and select the parameter you just created from the Parameters tab in the Expression Editor. Now run your report and the report will prompt for which data you would like to filter on and your report will automatically change the title to match your filtered data.