## What is a report?

A report is comprised of a report layout and a dataset. JReport Designer is used to create report templates that JReport Enterprise Server combines with the data retrieved from the data source to render report results at runtime.

Reports can be classified into three categories:

- Predefined - Report results that cannot be modified by the end user. The layout and data to be included can only be defined at report design time. The dataset used to populate the report can change each time the report is run.
- Dynamic - Report results that can be modified by the end user. The layout and data to be included is defined at report design time but can also be modified at runtime. Dynamic reports can be modified using parameters, DHTML functionality, or web controls.
- Ad Hoc - Reports are built and can be modified at runtime by the end user via the JReport Live technology. Other than building the business and report cubes to be used as the data source for ad hoc reports, no design work is required. Ad hoc reports can be built from scratch using a wizard or drag & drop.

### Report template

A report template contains static text and graphics as well as placeholders for data.

When a report is in the runtime environment, it connects to the data source associated with the report, executes the query, and applies the fetched data to the template thereby creating a report result file:

Therefore, each report result represents a unique data set; the one that exists at the time the query is run.

With dynamic reports, the report results can be filtered or sorted.

### Data sources and datasets

Reports pull data from data sources via queries, and then expose the query results to the report designer. JReport supports the following types of data sources:

- Relational databases through JDBC connections
- Data warehouses
- Java objects
- XML data
- Metadata layers
- User-defined data sources
- Hierarchical data sources

A dataset is the data that the JReport Server returns at runtime from a JReport query. A JReport query is comprised of one of the following:

- Imported SQL query file
- JReport defined query
- Stored Procedure call
- User-defined data source query
- Hierarchical data source query

Multiple data source connections can be used to generate multiple datasets. A report can use one or more datasets. Datasets can be used at design time, or at runtime for ad hoc report creation.