From Bright Pattern Documentation
Jump to: navigation, search
• 日本語
• 5.19 • 5.2 • 5.3 • 5.8

Importing and Modifying Report Templates

To work with and customize report templates in .jrxml format, you must first import them to Jaspersoft Studio using the following steps.

How to Import Report Templates

Step 1: Create a folder to store your reports

  1. In Jaspersoft Studio, navigate to the Project tab in the left-hand part of the screen.

  2. Select MyReports.

  3. Right-click MyReports and then select New > Folder.

  4. In the dialog box that pops up, select parent folder MyReports and name the new folder reports. This is the folder that will contain your report templates.

  5. Click Finish.

Step 2: Import report template files to the new reports folder

  1. Right-click the reports folder and select Import.

  2. In the dialog window that pops up, select File System.

  3. Click Next.

  4. Choose the folder where you have stored the report template files that you previously downloaded from the Contact Center Administrator application. These files will have .jrxml file extensions in their names.

  5. Select these files and click Finish.


Select the files to add to the reports folder


Example: How to Modify .jrxml Report Templates

Once you have downloaded a report template, you can use the visual editor of the Jaspersoft Studio to import and modify .jrxml report templates (e.g., remove some of the existing metrics or add new ones). Report templates in the .jrxml format that are imported to Jaspersoft Studio will look as shown:


Reporting-db-spec-image5.png


What follows is an example of how one might modify a .jrxml report template. In this example, the column Case is removed from the out-of-the-box Agent Activity Report and the formatting/visual appearance of the report is changed.

Step 1: Open file agent_activity.jrxml

  1. In Jaspersoft Studio, navigate to My Reports > reports.

  2. Find and double-click the agent_activity.jrxml file to open it.

Step 2: Select the elements you wish you change

  1. Select elements $R{col_case_id} in the group header frame, and $F{case_number} in the detail frame of the last column. You can select both elements at the same time.

  2. Right-click the selected elements and select Delete to remove these elements.


Selecting columns to delete


Step 3: Adjust the presentation of report elements as desired

  1. Select the report frames and reduce their widths by dragging the elements to the right position. You can use the grid lines to help you find the edges of each element.

    Frame width is adjusted


  2. To reduce the width of the report, click into the design view (the gray part of the screen, below the report) of the report in focus. That will bring up the Properties pane on the right-hand side of the screen.

    Report template properties


  3. At the bottom of Properties, select Edit Page Format. In the window that pops up, you can reduce the width of the report, as well as make other adjustments as needed.

    Properties > Page Format

If a report fails to build

In some versions of Jaspersoft Studio, Groovy scripting language jar file needs to be updated, as the one supplied with Jaspersoft is not always compatible with the BP formatter scriptlet. If during report compilation an error appears complaining of JRScriptletException class missing, a Groovy library matching the version used in Jaspersoft studio plugins folder must be downloaded from the official groovy distribution https://dl.bintray.com/groovy/maven/ (use groovy-all-X.X.X.jar from "embedded" subfolder). The official groovy jar has to be renamed to have exact same name as the supplied groovy jar, as it uses "_" instead of "-" in the name.

< Previous | Next >