1.1 Migrating ZRS Custom Reports with Simple Filters and without Filters

  1. Launch ZRS report.

  2. Click Edit Query.

  3. Click View SQL Query on the top left.

  4. In the SQL Viewer panel, select Use custom SQL.

  5. Copy and save the query.

  6. Launch iReport on the ZENworks Reporting 5 device.

  7. Connect to ZENworks Reporting 5 through iReport Designer.

    For more information, see Section 1.4, Connecting to ZENworks Reporting from iReport Designer.

  8. Click Tools > Options > Class path > Add jar.

  9. Select the JDBC jar file based on the database. The file is located at %ZRS_HOME%/js/Apacha-tomacat/lib.

    • For Oracle: the OJDBC5.jar file.

    • For SQL Server: the sqljdbc.jar file.

    • For Sybase: the jconn4.jar file.

  10. Click OK.

  11. Click the datasource icon .

  12. In the Connections / Datasources panel, click New > Database JDBC connection > Next.

  13. Specify a name for the datasource. For example, zenworks.

  14. Select the database based on your database.

    • For Oracle: Oracle (oracle.jdbc.driver.OracleDriver)

    • For SQL Server: MS SQLServer (2005)(com.microsoft.sqlserver.jdbc.SQLServerDriver)

    • For Sybase: Manually specify Sybase (com.sybase.jdbc4.jdbc.SybDataSource)

  15. Specify JDBC URL as follows:

    • For Oracle: jdbc:oracle:thin:@"+server+":"+port+"/"+database

    • For SQL Server: jdbc:sqlserver://"+server+"\\"+instanceName+";databaseName="+database

    • For Sybase: jdbc:sybase:Tds:"+server+":"+port+"?ServiceName="+database

    Where server is database IP address, port is database port, databaseName is database. If SQL Server is configured with named instance, then specify instanceName.

  16. Specify the database credentials, then select Save password.

  17. Click Test to test the database connection, then click Save.

  18. Click File > New, after the Query to create a report in the iReport Designer.

  19. In the New File panel, select the template for the report.

  20. Click Open this Template.

  21. Specify the details, click Next, then click Finish to display the Report template.

    The Report template includes various columns, such as Column Header, Page Header, Detail, and so forth.You can format and create the report by using the Report Inspector panel, Repository Navigator panel, and Properties panel. Report Inspector provide details about the report, Repository Navigator enables you to connect to ZENworks Reporting, and Palette panel provides report elements that are used in the report. These sub menus are available in the Window menu.

    For more information, see the Jaspersoft iReport Guide.

  22. In the Designer panel, click .

  23. In the Report Query panel, select SQL from the Query language list.

  24. Paste the copied query (from ZRS report) mentioned in Step 5.

    All fields related to the query are displayed. If an error is displayed, it indicates that the query has issues, and the query must be modified.

  25. Click OK.

  26. In the Report Inspector panel, expand Fields.

  27. Select all of the fields and drag them into the Designer > Detail band.

    All of the fields are added to the report with their respective names on Column Header.

    If you want to format the report, for example, to change the Column Header, select Column Header > Properties, then change the Height, Width, Border, Font Size, Font Style, and so forth.

  28. After creating a report, perform the following steps to upload it into ZENworks Reporting 5:

    1. In the Repository Navigator panel, expand Server tree.

    2. Select the folder location, then right-click > Add > JasperServer Report.

    3. In the ReportUnit Wizard, specify the details, then click Next.

    4. Select Locally Defined and browse to a report.

    5. Click Next.

    6. In the From the repository list, select /datasources/ZENworks_Datasource.

    7. Click Finish.

  29. Run the report in ZENworks Reporting 5.