There are occasions when you might want a user to run a report that has a complex set of advanced filters, including the use of several and and or conjunctions. For example, you might want to pose the following query filters (this is not a real query, but it is useful as an example):
This would be represented in the report editor like this:
Setting up a complex query with runtime filters
When the report is run, the user will see the following screen:
Running a complex query with runtime filters
When the user selects a customer from the top list, all the bottom filters that require a Customer will be set to use the value set from the top list. To accomplish this type of query with complex runtime filters, you set up Session Variable type fields in the Data Dictionary. Session Variable fields are created as follows:
Once this has been done, you will see that the advanced filter lists look something like this to the end users:
Session Variable field to be used as a runtime filter
Note that the Session Variables appear at the bottom of list fields. If you are using the Session Variable as a filter within a text, date or number field, you should enter it as $$FIELD_NAME$$, substituting FIELD_NAME with the name of your Session Variable field.