Table Report
You can  generate a table report from a preferred datasource added to the WSO2 server. You can select the datasource, field names of the table, formatting of the table design, etc, with a few steps, and get the data in a table report. A sample table report is as follows.
Following sections explain how you can generate a table report in WSO2 BAM.Â
Prerequisites
Run the KPI sample, which is shipped with WSO2 BAM to get sample data to generate the report. For instructions on running the KPI sample, see Monitoring key Performance Indicators.
Adding the Datasource
Follow the steps below to create a datasource to retrieve data from the H2 database table, which creates when the KPIÂ sample was executed. For more information on datasources, see Datasources.
If you have already added a datasource, skip this section and move to the next section.
- Log in to WSO2 BAM management console, and click Configure.
- Click Datasources, and then click Add Data Source as shown below.
- Enter the details about the datsource of the KPI sample as follows.
- Driver: org.h2.Driver
- URL:Â jdbc:h2:repository/database/samples/WSO2CARBON_DB;AUTO_SERVER=TRUEÂ
- User Name: wso2carbon
- Password: wso2carbon
- Click Test Connection, to validate the connection.
- If the connection is successful, click Save to add the datasource to the WSO2 server.
Adding the report
Follow the steps below to create the table report.
- Log in to WSO2 BAM management console, and click Tools.
- Click Add in the Reports menu, and then click Table Report.
- Enter the details of the database and the table for which, you generate the report as follows.Â
- Click Next.
- Enter the report formatting details as follows.
- Click Create. This displays the list of available reports.
Generating the report
Follow the steps below to generate the table report.
- Log in to WSO2 BAM management console, and click Tools.
- Click List in the Reports menu.
- Click on the name of the created report in the list of available reports.
- Select PDF for the Report Type, and click Generate.
- To download the report as a PDF file, click Save File on the pop-up screen as shown below, and then click OK.
- Open the saved PDF file to view the generated report as follows.