Display Prompt filter values in a OTBI report
The filter prompt at runtime is one of the most desirable features in OTBI reports as it gives the end user the capability to slice and dice a report without exporting it to excel. Even though it’s extremely easy to set up a prompt in an OTBI report, there is no easy way to display the values selected on the results page. Thankfully, the tool does provide a workaround and in today’s blog, we will explore the steps to show the selected filter values on the report making it much more intuitive to the end user.
The first step is to create a report with prompt values. The sample report contains ‘Full/Part Time’ and ‘City’ columns and we will build filters on those two columns:
While creating the prompt for full time, click on the drop-down corresponding to ‘Set a Variable’ and choose ‘Presentation Variable’. Enter ‘fullTime’ in the box below.
Similarly, create the prompt for ‘City’ and name the presentation variable as ‘city’.
Once we have created the prompts, we will navigate to ‘Results’ tab and add a narrative view.
Edit the ‘Narrative’ view and box labeled as ‘Narrative’ enter following code:
<div align="left"> <i> Following Parameters are selected</i> <br/><br/> <b>Full/Part Time :</b> @{fullPart}{All}<br/> <b>City :</b> @{city}{All}<br/> </div>
In above code, ‘{All}’ is appended after presentation variable to display ‘All’ when no value is selected.
Remember to enter ‘1’ where it says rows to display or else the text will repeat.
Click on ‘Save’ and navigate out to catalog and open the report. Enter values in the prompt and click on ‘Ok’.
As seen in the screenshot below, the selected prompt values are shown in right above the table. The presentation variables can also be added to the ‘Title’ view alternatively.
0 responses on "Display Prompt filter values in a OTBI report"