Skip to main content
Pentaho Documentation

Create Queries

Most data source types employ queries to refine the broader data set into a smaller, more relevant subset that is specific to the kind of report you want to generate. Most commonly, Report Designer users connect to a JDBC database and use an SQL query to refine the data set. For this purpose, Report Designer has both a query window where you can type in an SQL statement by hand, and an SQL Query Designer to help less SQL-savvy users refine data with a graphical drag-and-drop interface. There is a similar utility for metadata data sources called MQL Query Builder.

Both of the query builder tools are explained below. For all other query types -- MDX, XQuery, etc. -- there are public documentation and other help resources on the Web.

Note: The default setting for the query is to pull from session-based cache. If you do not want the query to use session-based cache, you need to go to Master Report > Attributes and change the data-cache field to false so that every time the query is run or the report opens, the query will refresh.