You are on page 1of 14

Steps for creating Conditional Filter Blocks:

The goal is to allow a user to choose between a group of prompts. The user will only be able to filter by one of the prompts. In the example we will allow the user to choose either to filter by Service Date , Entry Date or a Service Date Range ( Current MTD or Previous Month ). These filters will be applied to the billing information from Signature. The report used will be Census and Productivity Provider Summary in Public Folders > Physicians Practice Network > Detail Reports > Front Office Billing This process will involve the following steps: 1. Insert a value prompt to supply the list of possible prompts the user can choose from (Service Date , Entry Date or Service Date Range ) , set its static choices to be Service Date , Entry Date and Service Date Range 2. Insert a prompt button to change the displayed optional prompt 3. Insert a conditional block to hold each of our possible prompts ( Service Date , Entry Date , Service Date Range ) 4. Create a

First we insert a value prompt and set its parameter to ShowDateRange. This parameter will be used in the report filters as well as in the report header to figure out which date we are screening by. We do NOT want to Create a parameterized filter or Create a new query as we will supply static values for this prompt and create the filters ourselves as they are non-trivial.

I will create three static choices for this prompt: Entry Date , Service Date and Service Date Range. Also in the properties of the Value Prompt be sure to set a Default Selection. In this case we will add Entry Date as the Default Selection. This way when the user first runs the report they will see the entry date prompt rather than just a blank area where the prompt should be.

The next step is to insert a Prompt Button and set the Type property to Reprompt.

Then drag a Text item into our Prompt Button , this allows us to change the words from Reprompt to something more familiar to the user. In thise case we will use the word refresh.

We are now ready to add the Conditional Blocks that will hold our various filters. We drag a Conditional Blocks object into the prompt page. Then choose the Block Variable property of this conditional block and set it to <New String Variable>. Each value of this variable will show a different prompt.

We now name the string variable ( s_ShowDateRanges ) and enter values for the different conditions. These names should match to the names we entered earlier for our value prompt.

After clicking ok we will be prompted to choose the Report Expression that will be used to populate this variable. We will use the ShowDateRanges parameter we associated to our value prompt earlier. This means each time the value prompt is refreshed , this variable will have whatever value the user has selected ( Entry Date , Service Date or Service Date Range ).

Using the properties of our Conditional Block we will choose each different possible value and create the necessary prompts. For Entry Date and Service Date we will use a from and to Date Prompt and for Service Date Range we will use a value prompt. As Entry Date and Service Date are bascially the same I will only demonstrate one of those. First we set our Current Block property to Entry Date.

As you can see the block is currently empty but we will be filling it with a table to hold our two date prompts plus their headers. See the completed table below:

We will now ( not shown ) , switch our Current Block property to Service Date and repeat the exercise. After this is complete we will change our Current Block property to Service Date Range and create the radio button group that will allow the user to choose either Current MTD or Previous Month. We will insert a value prompt into the Conditional Block. We will call our new parameter ServiceDateFilter. We will not create a new query or

parameterized filter. Under the properties of our new value prompt we will enter Static Choices for Current MTD and Previous month. These Static choices do not actually filter the data. Implementing the logic of these choices will be done in the Query. We will also set a Default Selection to Current MTD.

In the properties we will also change the Select UI to be Radio Button group. We are now done with the prompt page. Running the report will show our prompt page which initially allows the user to filter by Entry Date. The user can change this to either Service Date or Service Date Range and click refresh to see the new prompt.

It is now time to use our new parameters to filter the query for the report. In this case there are two queries that feed the report. I will walk throuh filtering one of them but the process is the same for both. From the Query Explorer choose the query. In this case it is called QryWorkRVUChg ( work RVU and charges ). We will need three filters for this query. One for Entry Date , one for Service Date and finally one for Service Date Range. I will list the filter text below: For the Service Date Range radio button group: Note the different blocks for each type of date range. The final <> Service Date Range condition allows whichever other radio button value has been chosen to run ( Service Date or Entry Date ). ( ?ShowDateRanges? = 'Service Date Range' AND ?ServiceDateFilter? = 'Previous Month' AND year([Charges].[Charge details].[Service Dt]) = year(dateadd({mm},-1,getdate())) AND month([Charges].[Charge details].[Service Dt]) = month(dateadd({mm},-1,getdate())) ) or ( ?ShowDateRanges? = 'Service Date Range' AND ?ServiceDateFilter? = 'Current MTD' and year([Charges].[Charge details].[Service Dt]) = year(getdate()) AND month([Charges].[Charge details].[Service Dt]) = month(getdate()) ) or ?ShowDateRanges <> 'Service Date Range'

For the Service Date option: This filter is simpler as it only checks to see if we are screening for Service Date or not , Entry date is same as below. ?ShowDateRanges? = 'Service Date' AND [Charges].[Charge details].[Service Dt] between ?ServiceDateFrom? and ?ServiceDateTo? or ?ShowDateRanges? <> 'Service Date'

The only thing left to do is to change our report header calculations to use the new ShowDateRange parameter. if( ParamDisplayValue('ShowDateRanges') = 'Entry Date' ) then( ' | Entry Date from ' + ParamDisplayValue('EntryDate_From') + ' to ' + ParamDisplayValue('EntryDate_To') ) This will only show this particular header item if the value prompt has been set to Entry Date.

And we are done !

You might also like