Filtering Large or Streaming Data Sources
By default, the filter controls that you create in WebFOCUS Designer include, or are bounded based on, a list of values from your data source, which allows you to more easily select valid values from these controls. However, when working with large or streaming data sources, it may not be prudent to query the data source to retrieve this list, as a large number of values may exceed the maximum that can display in the filter control, or cause performance issues, while values from streaming data sources may change rapidly.
As an alternative, when creating a single chart or report, or a page with new content, you can provide dataless filters for specified segments in a data source, in order to conserve the resources needed to perform data retrieval. This filtering behavior is also applied at run time in pages created with new content. Filtering behavior in autoprompt and in pages assembled from existing content is not affected.
Once dataless filter controls are enabled for a segment in a data source, when you create a filter using a field from that segment, a predefined list or range of values is no longer provided in the filter control. For alphanumeric and numeric fields, the filter control is an edit box into which you can type your own values. In the case of alphanumeric fields, you can type multiple values, while for numeric fields, you type the start and end point for a range of values. For date fields, the filter is a calendar control in which only the previous week is selected by default. You should therefore be familiar enough with the data source to provide valid filter values.
The dataless edit box filter control used for alphanumeric fields is shown in the following image.
The dataless edit box filter control used set a range of values for a numeric field is shown in the following image.
The dataless calendar control is shown in the following image. Notice that the same preset date options and calendar selection options are available as when data retrieval is performed. Only the default custom date range is affected.
Dataless filter controls are activated for a segment in a data source by adding a property to the Access File of the synonym. Add the setting DATASIZE=INFINITE to turn on dataless filtering for a segment. This segment can represent an entire data source or a single table within a larger data structure, meaning that you can turn on dataless filtering for fields in individual segments that you want to filter without retrieving data values. Set the DATASIZE property to INFINITE in the Access File, as shown in the following syntax example.
SEGNAME=segment, DATASIZE=INFINITE, TABLENAME=table, $
Is the name of a segment whose fields you want to filter without data retrieval. The segment must be defined in the Master File with which the Access File is associated in the synonym. This allows you to configure dataless filtering for a selected set of fields.
Is the name of the original data source that the synonym whose Access File you are editing represents. This may be a flat file, a table in a database, or another collection of data records.
For more information about setting properties for metadata, see the Describing Data With WebFOCUS Language technical content.
Once enabled, filters created for fields from the specified segment are set by manually supplying filter values. Prompted filters for alphanumeric fields can be applied by typing the filter values into a text box. You can enter multiple values, and deselect previously entered values that you no longer want to use by clearing the check boxes in the list of values. Filter values that are deselected at design time do not appear at run time. You can determine whether selected filter values should be applied or excluded by right-clicking the control and selecting Include or Exclude.
Prompted filters for numeric fields also allow you to type in filter values. By default, numeric filters are applied as a range, bounded by a maximum and minimum. Therefore, two edit boxes are provided into which you can type a minimum and maximum value. If you change the filter to use an open-ended range that is greater than or less than a specified value, only a single edit box is provided in the filter control.
Prompted filters for date fields allow you to select a preset date range relative to the current date, or set a custom date range. The custom date range defaults to the past week, but can be set to any range of dates. By default, you set date filters to using a range with a fixed start and end point, but you can change it to an open-ended range that begins or ends on the selected date, by right-clicking the filter control and selecting a new filter relationship.
Static filters include a similar set of options when creating filters without referencing the data source. For all field types, the Select from data option is unavailable. For alphanumeric fields, this leaves the Select from file, Enter manually, and Wild card options, which allow the user to provide their own values. For date fields, this leaves the Select ranges, Select from file, and Enter manually options. The default date range for the Select ranges option is initially set to the current date, but you can set the start and end of the date range to any date, as needed. For numeric fields, this leaves the Select ranges, Select from file, and Enter manually options. When providing a range of values, the slider is removed, and you can provide start and end points for the range by typing a value into an edit box. The ability to create a filter by comparing two fields is unaffected.