Report Bursting

Jaspersoft Studio provides a built-in report bursting feature that allows you to burst a report based on some parameters and generate multiple reports, with each report having specific data. You can send these reports to different recipients with data relevant to them. For example, a single report containing shipping data of countries, such as Mexico, Canada, and the US, can be burst into different reports based on each country.

Report bursting is done by a report that triggers the bursting operation. Because reports have the built-in capability to retrieve records from a database, they can iterate through the records in the database. A bursting report needs a JasperReports Server connection to work with JasperReports Server. This connection is provided by the Jaspersoft Server data adapter and helps to retrieve information from JasperReports Server to trigger the bursting.

Bursting Scriptlet

A bursting report has a special scriptlet which is a bursting component. This scriptlet is attached to the data set of the bursting report. You can define a scriptlet by using scriptlet properties including, Name, Description, and Class. However, for class, there is a default value provided in Jaspersoft Studio itself, for example, Class: com.jaspersoft.jasperreports.jrs.bursting.BurstingScriptlet

A bursting scriptlet ensures it will create a scheduler job for each record in the data source with the required parameters by calling the REST API of the JasperReports Server. The jobs are created automatically during the report execution for each record in the data source.

The scriptlet uses a data adapter to create the connection for rest_V2/jobs when the report itself doesn't use a JasperReports data adapter.

Bursting a Report

The following example shows how to burst a report and send data of a country related to each recipient.

To burst a report:

1. Create a CSV file with two columns Country and Email, and create a data adapter that points to this CSV file.
2. Create a report containing two fields country $F(Country) and Email address of recipient $F(Email). This report is a bursting report used for bursting operation.
3. A bursting scriptlet is required for the bursting report. To create a scriptlet, in the Outline view, right-click the Scriptlets, and select Create Bursting Scriptlet. It will create a bursting scriptlet.

Creating a Scriptlet

4. To edit the properties of the bursting scriptlet, right-click the bursting scriptlet and select Edit Bursting Properties. Bursting scriptlet edit dialog will appear.

Editing a Scriptlet

5. On the Parameters tab, click Add to add the parameter. Report Bursting Parameter dialog will appear. Enter the Parameter name and Parameter value you want to pass to the burst reports. For example:
Parameter name: ShipCountry_1
Parameter value: $F{Country}

Parameter and its Value

6. On the Options Configuration tab, select the Essential Options from the left panel and set the following fields:
Server profile: select the server connection from the drop-down for the bursting report. For example, JasperReports Server Pro.
Enabled: true
Job Label: Sales By Country
Report URI: browse the repository and select the report you want to burst.

The path to the burst report in a bursting report is interpreted as relative to the user that runs the report. So if the burst report is part of an organization, you will not be able to have a bursting report that works for both superuser and users from that organization (jasperadmin and joeuser). superuser needs the absolute path and users from the organization needs a relative path. It is recommended to run bursting reports that belong to the same organization as the user.


Server data adapter: JasperReportsServerDataAdapater.jrdax. This data adapter makes the connection to the JasperReports Server and lets you publish the reports to the server.

Adding Essential Options

7. Select Output File Options and set the following options:
File name: “Sales-” + $F{Country}
Formats: select the output format for the burst report, for example, PDF or Excel.
Sequential File Names by Timestamp: true
Repository Folder URI: specify the location for the report exports to be generated in the repository, for example, /public/bursting/output. You can choose the output folder using the JasperReports Server picker (browse icon) or the expression editor. Before selecting the output folder, ensure that the output folder exists in the JasperReports Server repository.

Adding Output File Options

8. Select Job Run Notifications and enter the following information:
a. In the To field, enter the email id of the recipients, to do so:
  1. Click to enter the expression, Edit property value dialog will appear.

  2. Select Use Expression and click the expression editor.

  3. Edit Property Value Dialog

  4. Select Email Field String.

  5. Expression Editor

  6. Click Finish.

  7. Click OK.

b. In the Subject field, enter the subject for the mail to be sent to recipients.
c. In the Message field, type the message you want to send to recipients.
d. Click OK.
9. Run a bursting report.

Burst reports will be created in the output folder for different countries in both formats pdf and excel.