Domains use different mechanisms for screening the data.
Domains (and Domain Topics) can be filtered by selecting fields in the Domain and specifying comparison values. The filters can be configured for users to select the data.
Within the Domain design, filters based on conditions can also be defined; these filters are not displayed in the report viewer when the report runs.
You can define filters in the Ad Hoc Editor whether you are working with data from a Domain or Topic. Such filters are helpful in improving the view's initial performance by reducing the amount of data the view returns by default.
To prevent users from seeing the full dataset, you can also use input controls in a JRXML Topic or filters defined in the Domain design, which can be hidden from end users. For more information, see Section 2.8.3, Input Controls and Filters Availability.
Input controls and filters interact smoothly. For example, you can create filters in an Ad Hoc View that gets data from a JRXML Topic that includes input controls.
The server refreshes the editor against both the filters and the input controls. Because some combinations of input controls and filters do not return data, this can result in an empty view.
NOTE:If the result set is empty, check for an incompatible combination of filters and input controls, such as a standard filter and a Advanced Filtering.filter, or an incorrectly-defined advanced filter expression. (Data must meet all criteria in multiple filters, rather than meeting criteria in a subset of those filters). For more information, see
JRXML is an XML file format for saving and sharing reports created for the ZENworks Reporting and the applications that use it, such as iReport Designer and ZENworks Reporting. JRXML is an open format that uses the XML standard to define precisely all the structure and configuration of a report.
In some cases, filters can conflict with view parameters, and you must rename the field that is causing the conflict by editing the JRXML file.
You can define filters in the following places:
The Data Chooser (While creating a view from a Domain).
The Ad Hoc Editor (even when the view is based on a JRXML Topic).
For information about defining filters in the Data Chooser, see Pre-filtering data.
In addition, you can control how and what filters are applied to a field or fields by using advanced expressions. For more information, see Advanced Filtering.
To create a filter in the Ad Hoc Editor:
Right-click a field in thepanel, then click .
A new filter displays in thepanel. If the panel was hidden, it appears when you create a new filter.
If the results are empty, check for an incompatible combination of filters and input controls. Click to compare input controls with the filters in thepanel.
Use the fields in the filter to change its value.
Depending on the selected data type, the filter can be multi-select, single-select, or text input.
Click , then selector to toggle expansion of the items in the filter.
Click , then selectto remove the filters.
Click to hide the filter's details.
Click to view the filter’s details.
Click thecheck box (if it appears in the panel) to select all values in the dataset.
Thebox does not appear in the panel for numbers and dates.
When you change a filter, the server uses the new value to determine the data to display. If you change only the operator in a filter, you must deselect the value in that filter and then reselect it to apply the updated filter.
For filters with multiple values, you need not reselect all values. After changing the operator, use Ctrl+click to deselect one of the values and then Ctrl+click to reselect that value.
You can filter information in your view based on a date range relative to the current system date. You can view this by using date-based filters and specifying a text expression describing the relative date or date span that you want to view, by using the format <Keyword>+/-<Number>.
indicates the time span that you want to use. Options include: DAY, WEEK, QUARTER, SEMI, and YEAR.
or indicates whether the time span occurs before or after the selected date.
indicates the number of the time spans you want to include in the filter.
To create a relative date filter:
Follow the instructions in the Section 2.8.1, Using Filters.
In the filter's first text box, specify an expression describing the relative date or span date.
In the filter's second text box, specify the date that you want to base your filter on.
To create a complex filters:
Right-click a group member in a crosstab, then selector .
When you create a filter against an inner group, the filter that appears might be created as a complex filter.
A complex filter cannot be edited, but can be removed. Complex filters also appear in the Ad Hoc Editor if a Data Chooser wizard filter was created and locked.
When you create multiple filters they are, by default, connected with an implicit AND operator; that is, the data displayed in your table, chart, or crosstab is what remains after all of your filters are applied.
However, with the advanced filter functionality, you can control the displayed data by applying an advanced expression that includes more complex, nested AND, OR, and NOT operators, as well as by applying multiple filters to a single field.
Advanced filters are useful in situations such as the following:
When using the AND operator isn't sufficient. For example, consider an international company that wants to view data for stores located on the Pacific Rim; they might create an advanced expression with the following criteria:
Country is USA
State is California OR Washington OR Oregon OR Hawaii OR Alaska.
Country is Japan OR Indonesia
Using the AND operator for all of these criteria returns an empty view, because no store is located in all of those areas.
When you need to eliminate some results in a field. For example, if your food and beverage distribution company wants to view sales for all drinks except for high-price items, you might include the following criteria in an advanced expression:
Product Group is Beverages
Price is greater than 39.99
This filter displays all items in the Beverage Product Group, but it filters out those with prices over $39.99.
These are only two scenarios where advanced filters can complete your results and make your view more precise. There are many other situations where they can be applied.
Other advanced filter tasks include the following:
Creating an advanced expression
Editing an advanced expression
Removing an advanced expression
Applying multiple filters to a single field
NOTE:Advanced filters are applied to the Views, but filter details do not display on previews or on the report generated from that view.
To create and apply an advanced filter:
Create two or more filters for your data, as described in Section 2.8.1, Using Filters. These can be standard field-based filters or and filters.
As you create the filters for use in an advanced expression, the data in your view disappears, since most of the data does not meet all of the filter criteria. When you create your advanced expression and change some of the ANDs to ORs and NOTs, again the data appears.
At the top of thepanel, click , then select to display the panel. By default, the panel is empty.
In the Edit.panel, click
In the Edit Advanced Filters panel, use the filter preview window to locate the filters.
Filter letter designations are case-sensitive and must be capitalized.
Enter a filter expression using the letter designations, Include the following operators:
AND narrows your results and includes only fields that meet the criteria of both filters before and after the operator.
OR broadens your results and includes fields that meet the criteria of either filter before or after the operator.
NOT excludes results that match the criteria.
Parentheses combines multiple filters into a single item in the expression.
Check your expression by clicking the Validate button.
If your expression is successful with the available filters, themessage is displayed. For an incorrect expression, an message with details is displayed.
When your expression is validated successfully, then click.
Your view is updated and displays in the newly applied filter criteria.
After creating an advanced filter, you can add another filter to the expression or remove existing expression.
NOTE:If you want to delete the simple filter from an advanced filter, you must first delete from the advanced filter expression. So, deleting the filter deletes the advanced filter expression.
To add a new filter to an existing advanced expression:
Create a new filter in thes panel.
In thepanel, click .
In the Edit Advanced Filters panel, add the new filter to the expression.
Any unused filters in the filter preview window are grayed out.
Clickto check the integrity of the new expression.
When your expression is valid, then click.
To remove a filter from an advanced expression:
In thepanel, click .
In the Edit Advanced Filters dialog, remove the filter from the expression, then update the expression as required.
Clickto check the integrity of the new expression.
When your expression is valid, click.
When working with advanced expressions, you can delete an existing expression and create a new expression.
To remove an advanced expression from a view:
In thepanel, click .
Clear the expression from thebox.
When you refine your advanced expression, you can delete unused filters from thepanel.
If you want to remove the filter from the advanced filter, place your mouse on in the Filter's title bar, then click.
If you want to remove all existing filters, including the advanced expression, place your mouse on , in thepanel, then click .
In the Ad Hoc Editor, you can view the input controls defined in the Topic as visible to users. You can accept the default values of the controls or enter other values. The Ad Hoc Editor indicates that the view has input controls by displaying the icon as active on the tool bar. Click the icon to select new values or to save values as the new defaults for this view.
To add an input control to the view using a filter:
Create a new filter, or use an existing filter in thepanel.
In Filters, click next to the new filter, then select.
Select an operator from the drop-down and specify the value in the text box.
The filter displays as an input control when the view is used to run the report.
Place the cursor on , then select
Name the view, select a location, then click.
On the tool bar, click .
Only the input controls defined in the topic are displayed. If no input controls were defined in the topic, the button is grayed out.
To edit the values for a view's input controls:
On the tool bar, click .
A window listing the input controls defined in the Topic displays.
Select new values.
To change default values of input controls, select the check box labeled.
The selected values become the default values when you save the view.
The Ad Hoc View displays the updated data.
Input controls and filters display in the Editor and when you run a report.
Input controls can be set to be visible or invisible when you edit a view:
Input controls that are set toare displayed in the editor and always appear before the report is run.
Input controls that are not set toare hidden in the editor and appear when the report is run.
Filters created in the Data Chooser wizard can be locked or unlocked:
Filters that are unlocked display filter details in the editor and are available from thebutton when the report is running.
Filters that are locked display input controls in the Editor when you click this icon . However, they are not available from thebutton when the report is running. You can remove the filter from the Editor, allowing them to see all the unfiltered data, when the report is running.
Filters defined in the editor are always available in thepanel of the editor and from the button when the report is run.
When setting up input controls for a large view that takes a long time to run, consider setting the view to. Before a report is run, the report viewer prompts you to provide the input options preventing the report from running with the default input options.
Filters that are unlocked are available. When input controls or filters do not display in the report viewer, click thebutton to view them.
To set an input control to prompt:
Locate a Topic, in the repository, then click.
In thepanel, under Options, click .
To determine whether an input control is visible:
Locate a Topic, such as the Parameterized Report Topic, in the repository, then click.
On thepanel, click the name of an input control.
On thepanel, click .
At the bottom of thepanel, if the check box is selected, the input control displays on the report when it runs.
If you do not specify a default value for the input control, users are prompted to select a value when they create a View based on the Topic.
To lock a filter:
In the Data Chooser, after selecting the fields, Click.
Double-click a field in thepanel.
In thepanel define a filter.
For more information, see Pre-filtering data.
Select thecheck box, then click .
Clickto open the Ad Hoc Editor.
In thepanel, the name of the filter and a note about the lock displays under the heading.