Submitted by Sampath K Maduri, Horizon Blue Cross Blue Shield of New Jersey
Here's a technique that allows you to dynamically render a date or date range prompt based on user selection. This can be achieved by using conditional blocks and different prompt pages, however, this technique uses a single prompt page and conditional block.
Open Report Studio against any package - the package isn’t important as no data items will be used from the package to create the prompt page or report.
- Insert a table with 4 columns, 4 rows.
- Drag and drop a value prompt on the prompt page, name the parameter Parameter 1. Change Select UI to Radio button group and Autosubmit property to Yes.
- From the Static Choices window click Add and Create Use and Display. Once this step is complete, the Static Choices window should appear as:
- Set the default selections as Day Prompt.
- Using Conditional Explorer create a Boolean variable with the following expression
ParamDisplayValue('Parameter1') = 'Day Prompt'
- Drag and drop a Conditional Block on the prompt page and set the Boolean variable created in Step 5 to Block Variable.
- Select Current Block to No and drag and drop a date prompt, select block Yes and drop the date prompt and change the Range Property to Yes.
- Drag and drop a value prompt, set Cascade Source as Parameter 1 and Box type as None.
Now execute the report. By default the day prompt radio button is selected. The single date prompt appears on the prompt page and when the user selects Date Range Prompt, the prompt page refreshes and shows the date range prompt.