Filtering opportunities
Generally, one goal in developing reports with acceptable performance is to limit the amount of data in a report to just the data that meets the report users’ requirements. You limit, or filter, data in different ways depending on the type of data source and the type of report.
The first opportunity to set a filter is to use any filtering techniques provided by the data source. For example, JDBC-compliant databases allow users to run SQL queries that retrieve specific columns and restrict rows using WHERE clauses. In fact, best practices recommend designing databases with filtering in mind. You can achieve optimal report performance by filtering data while it is still in the database.
After BIRT retrieves the data from the data source, there are several more opportunities for filtering. Base the decision on where and when to filter on efficiency. For example, instead of creating two data sets that return similar data, one for populating a table and another for populating a chart, create one data set for use by both the table and the chart.
You can use a combination of filtering techniques. For example, if accessing data from a database, you can write a query that filters some rows and use other filtering techniques to filter additional rows. Figure 15‑1 shows the effects of filtering at different points in processing data.
Figure 15‑1 Filtering opportunities