### Creating predefined filters

You can predefine filters in business views for end users to choose when they design or modify reports and library components. The following example shows the basic usage.

1. Open the catalog file SampleReports.cat in `<install_root>\Demo\Reports\SampleReports`.
2. In the Catalog Browser, go to Data Source 1 > Business View, right-click WorldWideSalesBV, and select Edit from the shortcut menu.
3. In the Business View Editor, click Tools > Predefined Filter on the menu bar or click the Predefined Filter button on the toolbar. The Predefined Filter dialog appears. See the dialog.

4. Click the New button, double-click in the Name cell of the filter and change its name to QuantityFilter, then in the Condition panel, click the Add Condition button and define the filter as Quantity>=3000.
5. Click the New button to add another filter and name it RegionFilter, then define the filter as Region=North America.
6. Click OK in the Predefined Filter dialog to save the filters. You can then apply them when creating or editing reports and library components based on the business view in JReport Designer or in report studio after you publish the corresponding catalog to JReport Server.

Notes:

- When the resources that are used in some predefined filters are removed from the business view, the next time when you open the Predefined Filter dialog, you will be prompted with warning messages showing the details and the filters will be removed automatically from the dialog as well.
- The following SQL type of data cannot be sorted: Db.SQL_BINARY, Db.SQL_BLOB, Db.SQL_CLOB, Db.SQL_LONGVARCHAR, Db.SQL_LONGVARBINARY, Db.SQL_VARBINARY and Db.SQL_OTHER.