##### Defining query range via the WHERE portion

JReport Engine Bean provides methods for adding, deleting, saving and getting a new WHERE portion in a catalog. Note that the join relationships of the tables will remain in the new WHERE clause. By specifying the name of the WHERE portion, you can pick it out from the report catalog and bind it with the current query:

- setNamedWherePortion(queryName)
  Sets a named WHERE portion from the catalog to the query of the current report. If this WHERE portion is not found in the catalog, "false" will be returned.
- setWherePortion(WherePortionString)
  Sets the WHERE portion in String format to the query of the current report.
- saveWherePortion(queryName, WherePortionString)
  Saves the WHERE portion in String format with the specified query name in the report catalog.
- deleteWherePortion(queryName)
  Deletes a specified WHERE portion from the report catalog, updates and saves the catalog after deletion.
- getAvailableQueryFields()
  Gets the available query fields from the query of the current report. This will return an enumeration of the names of fields, formulas and parameters and their corresponding data types which are required to build up the WHERE portion and validate the condition.
- getAvailbleWherePortions()
  Gets an enumeration of the names of all the WHERE portions saved in the report catalog.
- SaveCatalog()
  Saves the current catalog. Returns "true" if successfully saved.

Parameters

- queryName - The name of the WHERE portion in the SQL query.
- SQL - The specific WHERE portion.