I thought of blogging about another pretty common question which keeps getting repeated in the forums. The question is “How do we refer the Presentation Variables in the Title of a report?”. Lets try to achieve that here. To take an example, i have a dashboard page containing a dashboard prompt and a sample report. The sample report will be filtered based on the value chosen in the dashboard prompt. This is achieved using a presentation variable product.
Now, our aim to display in the Title of the Report something like “Product Chosen in the Prompt is:Actual Value Passed in the Prompt“. Now lets go to the report and add a sample dummy column. In that dummy column refer the presentation variable like this ‘@{product}’ including the single quotes and hide the column.
Now go to the narrative view of the report. In the narrative view enter the desired text followed by @n (@ refers to the column and n refers to the column position. In our case we are referring to the hidden presentation variable column). Now go back to criteria. Remove the filter (the reason why we are removing the filter is we would be getting a no data found message and hence we would not be in a position to arrange the narrative view to look like the title view). Once this is done, add the narrative view to look like the title view. And go back to the criteria and add the filter again with the presentation variable. Save the report. Now you would be able to see the filter with a customized message in your title view.
The advantage of the narrative view is that you can format your variables and also can add marquee like scrolling titles using various HTML formatting tags. But if you just want display the filter applied without any custom message you can use the Filter View.