This is an old revision of the document!
Filters
Versago Data Views can filter data before it is displayed to the user. There are two types of filters:
User-Applied
User Account.
Filters associated with Crystal Reports or Stored Procedure parameters are automatically displayed in this step.
User-Applied Filters
User-Applied Filters allow the user to provide input about how they want to filter the information for selection.
Select User-Applied Filter as the Filter Type from the drop-down list.
Select the report value to be filtered from the Filter Name drop-down list.
Display Name is what the user sees when executing the report. The default value is the same as the “Filter Name” but is usually changed to something more user friendly
Data Type indicates the type of data of the “Filter Name” column. This is for information only and cannot be changed.
Control Type defines the type of field the user sees for the parameter selection. Options are:
Text presents a text box where the user enters any value they wish.
Dropdown presents a list of unique values from which the user can choose. This option should only be used when the potential list of unique values is relatively short. See item 7 (below) for additional information.
DatePicker presents a standard Windows “date picker” tool to assist with selection of date values.
This option is automatically assigned with the data type of the “Filter Name” column is Date or DateTime.
Checkbox is not currently used.
Mandatory is used to ensure that the user puts some value in this parameter.
If a parameter is not mandatory and no value is provided by the user, the filter is simply not applied.
Values Source defines how the values used for the Drop-down control type are generated.
This option is only available when Control Type is Drop-down.
Dynamic creates a list of unique values from the “Filter Name” column. The user can then select from this list.
Static allows the developer to create their own list of selection values. These values must obviously make sense in the context of the data. If this option is selected an additional dialog page is presented to set the static values. See the
Setting Static Filter Values section for additional information.
Filter Criteria sets the default filtering option used for this parameter. The option can be changed by the user at report execution time as needed.
Options for text values include:
Equals (exact match)
Not Equal (exact match)
Contains
Starts With
Options for numeric and date values include:
Equal (exact match)
Not Equal (exact match)
Greater Than
Greater Than or Equal To
Less Than
Less Than or Equal To
Between (top and bottom values inclusive)
It is helpful to try and determine the most common filtering option and set it as the default.
Default Value sets a default filtering value. The value can be changed by the user at report execution time as needed.
Visible indicates if the user sees the parameter or not. This option is used when the report designer wants to filter the report in the same way all the time but does not want to put the filter in the data selection code
A “Default Value” must be defined if this option is used.
Control Visibility Order has no significance for the report developer and can be ignored.
Click the [Add Filter] button to add additional filters.
Click the red X icon to delete an existing filter.
User Profile Filters
Profiles are filters that are predefined by the Versago administrator. They are applied automatically when the report is executed. The filtering value(s) are associated with each user. The profiles must be defined before they can be associated with a report.
Select User Profile Filter as the Filter Type.
Select the Profile Name from the “Filter Name” drop-down list.
No other information is required.
Application of Filters
A report can have multiple filters.
User-applied filtering is applied based on the display order of the filters. This means that the first value filters the initial data set, giving a data subset. The next value then filters the first data subset, and so on.
Profile values are automatically applied. Filtering is done based on the profile value(s) associated with the current user. This applies for both Versago reports and Crystal Reports.
When both parameters and profiles are defined for a Versago report, the parameters are applied first and then the profile filtering is applied on the final subset of data. Display order is not considered, with two exceptions noted below
In the case where the parameter control is a drop-down list AND the available values listed are coming from the report data (dynamic vs. static):
For a Versago report, the profile filtering is applied first and then the filtering based on the parameter is applied.
For a Crystal Report, the parameters are applied first and then the profile filtering is applied.
The inconsistency between these two situations will be addressed in a future version of Versago.