## Making high-efficiency reports

The following ways are provided for you to make reports efficient, reliable, and fast at runtime.

- Suppress all useless panels in a banded object, such as Group Header and Footer panels which are not adding values to the report.

  To do this, select the panel, go to the Report Inspector, and then change the property Suppressed to true.

  This is more efficient than hiding the panel.

- Set the precision (length) of DBFields or record level formulas to the size of the maximum value you need to display in the report. Make them larger than necessary wastes resources.

  To do this, go to the Catalog Browser, expand the Properties sheet, select the DBField or record level formula, and then change the Precision property to an appropriate value.

  Note: If you cannot change the properties on the Properties sheet, click the Options button on the Catalog Browser toolbar, in the Options dialog, select the Catalog category, uncheck the option Forbid editing data object properties.

- You can improve the report performance by setting the data buffer size to a larger value.

  By default, the size of data buffer is 2MB. When data exceeds the default size, date will be written to disk, which will slow down the report processing. JReport Designer enables you to set data buffer size by specifying two properties of dataset in the Report Inspector: Records per Page and Max Page Number. For details, see Data Buffer.

- Adjust Result Buffer.

  The result buffer is used to store the report result in pages. Its default size is 4 which indicates 4 pages of the report result are allocated to the result buffer, other pages will be stored on disk. If you have enough memory, to get better performance, you can increase the result buffer size to store more pages of report result.

  To adjust the result buffer size, in the Report Inspector, highlight the node which represents the report, and then change the value of Result Buffer Size to the number of pages you want to hold in memory.

- Adjust Excel Buffer for exporting to Excel.
  The Excel buffer is used to store the report result in excel buffer sheets when exporting to Excel format. Its default size is 1, which indicates 1 sheet of the report result are allocated to the result buffer; other sheets will be stored on disk. If you have enough memory, you can increase the Excel buffer size to store more sheets of excel format report result in memory. For details, see Setting the Excel buffer size.
- When running a report to the Delimited Format (such as the CSV format) on JReport Enterprise Server, the property Fast Pass can help you speed up the generation process. Setting Fast Pass to true will enable you to specify the position of the object you want to display in the result file, thus JReport will not calculate the position for every object during the generation process.

  To use this method:

  1. In the Report Inspector, select the node that represents the report and set the properties Fast Pass and Columned to true.
  2. For each DBField or label, set the exact coordinate using the properties Column Index and Row Index.

     For example, set the properties Column Index=0 and Row Index=2 for a DBField, JReport Designer will put this DBField into the first column and the third row in the generated Text file.

  3. Set the property engine.single_thread = false in the file server.propertise in `<server_install_root>\bin`. This enables the property Fast Pass to take effect when running the report to the Delimited Format.
- Cache Section.

  The Cache Section property is used to cache the objects in the Detail panel of a banded object instead of creating them repeatedly. You can set Cache Section in the Report Inspector to true to improve the performance.

  Note: Cache Section doesn't work if there is crosstab, text object, chart, etc. in the Detail panel of the banded object, because these objects contain child-DBFields.

- Cache Value (only for DBFields).

  The Cache Value property is used to cache the layout attributes (font size, font face, width and so on) of DBFields when exporting the report to any format. To get better performance, set it to true in the Report Inspector.