Creating custom reports
Follow these steps to create custom Jasper reports.
- Download Jasper Reports Studio version 6.16.0 or above from the Jaspersoft site and install it.
- Launch the Jasper Reports Studio.
- Create Data Adapter: Create a data adapter, which will connect to the Control Center
database. Ensure you have JDBC Driver and following database details:
- Database host address
- Database port
- Database username, password for the database user
- Database name.
- From Jasper Reports Studio, open the menu .
- When Data Adapter Wizard opens, enter the File Name and click Next.
- Select Database JDBC Connection as the source and click Next.
- Add the following details and click Finish.
- Data Adapter name
- Select the appropriate JDBC Driver from the dropdown list: Supported drivers are, Oracle (oracle.jdbc.driver.Oracle Driver), MS SQLServer (2005-2012) (com.microsoft.sqlserver.jdbc.Serverdriver), IBM DB2 (Type 4) (com.ibm.db2.jcc.DB2Driver)
- Update the JDBC URL field with Control Center database connection details.
- Update the Username field with Control Center database username.
- Update the Password field with Control Center database user’s password.
- Select the Driver Classpath tab at the bottom of this dialog box.
- Click Add to add a database driver.
- Browse to the database driver file and select it.
- Click Test at the bottom of this dialog box to validate the connection details.
- Create Jasper Report: Follow these steps to create a report using report template:
- Go to .
- In the New Report Wizard, you can select an already designed template or select a blank template. For this scenario, select the Blank A4 template and click Next.
- Provide the File name for the report (Extension must be .jrxml ) and click Next.
- In Data Source step, select the data source that you have created earlier from the Data Adapter dropdown.
- Once the data source is selected, the left hand of the dialog will be filled with database objects.
- On the right side, enter the SQL query to get the data for the report and click
SELECT * CC_FILE_TRANSFER
- In the Fields step, from the Dataset Fields section, select the fields that will be part of the report and move to the Fields section and click Next.
- In the Group by step, if required, from the Dataset Fields section, select the fields to be grouped by and move them to Fields section and click Finish.
- Design the template:
Jaspersoft provides various basic elements which can be used to design any type of reports. Some of the elements are Text Field, Static Field, Image, Line, Rectangle, List, Chart, Table etc. The steps below will guide you on updating the report with title, column headers and data fields:
- The report based on the blank template has various band sections:
- Title: Band to provide the title of the report.
- Page Header: Band to provide header of each page.
- Column Header: Band to provide title of each column.
- Detail 1: Band to provide the actual data which is fetched from the database. You can provide multiple detail bands.
- Column Footer: Band to provide footer of column.
- Page Footer: Band to provide footer of each page.
- Summary: Band to provide summary of report.
- Add a static text field to the Title band. From the right-hand side palette, drag and drop Static Text into the Title band section. Double click on it to change the text. You can also customize the text more from the right-hand side Properties section.
- If needed, add a page header in the Page Header section. Example: Page 1 of 10. This can be achieved by using the Page Number element and Total Pages element.
- In the column header section, add static texts for each column for which you want the data to be displayed in the Detail section. Change the text of each static text by double click the added static text field.
- To display the data from the database, from the right-hand side palette, drag the Text Field element and place it the appropriate location on the detail band. After placing the Text Field, double click on it and select the appropriate database column that will provide the data for this field. Repeat the process for all the data to be displayed in the Detail section.
- If needed, add elements to Column Footer section and Page Footer section.
- After customizing the report, click Preview tab at the bottom to view the report output and to test it.
- If needed, click on the Design tab to modify the report.
- Once all the customization is done, Save this report.
- Run custom report from IBM Sterling Control Center: Custom reports created using Jasper
Report Studio can be used within Control Center. Before the report can be used, the report
definition file that ends with .jrxml must be copied to Control Center configuration folder. To do
so, follow these steps:
- Locate the definition file of the Jasper Report that you have created in the file system ending with with .jrxml. Example: It could be located under C:\Users\<<UserID>>\JaspersoftWorkspace\MyReports folder.
- Copy the reports definition file to <<CCInstalledLocation>>conf\reports\custom folder. This file must be copied to all the instances of Control Center in a clustered environment.
- Restart the Classic Console.
- Go to .
- Click Create from the Reports Listing panel,.
- Select Custom as the Report Category to find your custom report.
- Select the report to run and click Next.
- Select the report output format and click Next.
- Click Run Report.
- After the report output is displayed, you can save the report.