The Data Manager in Logi Report Designer allows you to control the data retrieval of your queries (and also imported SQLs, stored procedures and user defined data sources), including the number of rows to be displayed and the duration allowed for retrieval. It can also keep access information from previous runs of a query.
This topic includes the following sections:
- Limiting the Query Runtime and Number of Records
- Viewing a Query's Running History
There may be many records in a table on which you are to build a report. After you have generated the query and designed the rough report, you may only want to preview several lines of records for testing, in which case, you can take advantage of the two properties - Maximum Rows and Maximum Duration which allow you to limit the run time and number of records, saving time and resources. Taking Payroll Report.cls as an example:
- Select File > Open to open the page report Payroll Report.cls in the catalog SampleReports.cat saved in
- Adjust the Maximum Rows and Maximum Duration properties of the query Payroll on which the report is built to suitable levels. You can adjust the values in either of the following ways:
- In the Catalog Manager, right-click the query and select Properties from the shortcut menu. In the Properties sheet, change the property values as required, then press Enter on your keyboard to apply the change.
- In the Data panel, right-click the query and select Properties on the shortcut menu. In the Properties dialog, edit the property values as required and then press Enter to confirm.
Here, modify the value of Maximum Rows to 10 and change the value of Maximum Duration to 1 second. This specifies the maximum elapsed time to be one second, and that within this duration no more than ten records will be fetched.
- View the report. You will find that only ten rows are fetched within one second.
If your queries use data from a relational database, you can further customize where the two properties will be implemented, on Logi Report side or on the database side by configuring the file JdbcDriversConfig.properties, which is available in both Logi Report Designer and Logi Report Server in its
The following is an example of setting the two properties:
DriverName_D2 = Oracle JDBC driver
Vendor_D2 = Oracle
Version_D2 = 188.8.131.52.0
supportMaxRowPushDown_D2 = true
supportMaxDurPushDown_D2 = true
Database driver name that should be used to establish a connection. You can use connection.getMetaData().getDriverName() to obtain the value.
The vendor of current JDBC driver. It is a string value.
The version of current JDBC driver. You can use connection.getMetaData().getDriverVersion() to obtain the value.
Specifies where the property Maximum Rows will be implemented, on Logi Report side or on the database side. By default, it is set to true, which means the property will take effect on the database side. If it is set to false, the property will take effect on Logi Report side.
Specifies where the property Maximum Duration will be implemented, on Logi Report side or on the database side. By default, it is set to true, which means the property will take effect on the database side. If it is set to false, the property will take effect on Logi Report side.
It is a user defined name used to mark a group of driver settings different from the other groups.
- If the value of the Maximum Rows/Maximum Duration property is 0 or a negative number, it means the number will be unlimited.
- If the number you specify for Maximum Rows/Maximum Duration is equal to or more than that required for running all the records in your report then you will retrieve all of the records.
- It is not recommended to specify both of the properties at the same time. Sometimes the time information for large-data reports may not be very accurate. For example, if you specify 5 seconds, you may find that it takes 7 seconds, since this time also includes the time for writing the history information to a file.
- Select the Refetch Data button on the toolbar of the View tab to run the report again if you find that the specified properties have not taken effect.
- These two properties apply to the specified query, not the report. For a report with a subreport, specifying the properties for a query used by the primary report will not have any effect on the subreport's query, and vice versa. For example, Report A.cls uses query Q1, and Report B.cls uses query Q2. B.cls is inserted to A.cls as a subreport. Maximum Rows for Q1 is modified to 3. The primary report will now only fetch three records, whereas Q2 for subreport B.cls will not be affected. To limit the subreport records, you will have to restrict Q2.
- In JdbcDriversConfig.properties:
- If there are more than one group with the same group marking name, the last group will be adopted.
- If the sign # is seen before "DriverName" of a group, or if setFetchSize is given a negative value, the whole group will be disabled.
An important function of the Data Manager is to keep track of the run information of queries. By default, the information is not recorded and shown in the Data Manager to improve performance. If you want to show the history information, you need to first add the command line
alwaysShowDMRecord=true in the file report.ini in
stall_root>\bin, and then specify the Maximum Duration and Maximum Rows properties of the queries in Logi Report Designer. Then, the history information will be recorded in a file in
<install_root>\dm. In this folder, Logi Report generates a subfolder for each catalog. For example, if the Logi Report sample report is run, a folder SampleReports will be created in
<install_root>\dm. In addition, a file with a .dmt extension corresponding to the query will be created in the subfolder to store the run history information.
To change the Data Manager information output location (the default is
<install_root>\dm), edit report.ini in
<install_root>\bin. Change the location in the argument
dmPath=C\:\\LogiReport\\Designer\\dm to the location where you would like the information to go to. For instance,
dmPath=C\:\\temp\\dm. Make sure that the folder you specify in the report.ini argument already exists.
- Open the file report.ini in
<designer_install_root>\binand add the command line
alwaysShowDMRecord=trueas follows. Here, it is assumed that Logi Report Designer has been installed to
C:\LogiReport\Designer. The escape character backslash following "=" and before each special character such as ":" and "\" are required.
#Wed Jan 04 15:55:43 CST 2017
- Start Logi Report Designer and open a report.
- Adjust the Maximum Rows and Maximum Duration properties of the query on which the report is built to suitable values.
- Select the View tab to view the report.
- In the Catalog Manager or the Data panel, right-click the query the report uses and choose Data Manager from the shortcut menu.
- The running information of the query is displayed in the Data Manager dialog, which includes when the report is run - date and time, the running duration, the number of rows displayed, and the report that uses the query. You can sort the items by Date, Time, Number of Rows, Duration, Report, simply by selecting the column title.
The following is an example to demonstrate how to use the Data Manager with the sample report Payroll Report.cls. Here it is assumed that the command line
alwaysShowDMRecord=true has been added to the file report.ini in
- Open the page report Payroll Report.cls in the catalog SampleReports.cat. Make sure not to view the report.
- Select Home > Catalog Manager.
- In the Catalog Manager, expand the Data Source 1 > Queries node, locate the query Payroll then right-click it and select Data Manager. The Data Manager dialog is shown without any history information, since the report has not yet been run.
- Close the Data Manager, then specify Maximum Duration as 3 and Maximum Rows as 5 in the Properties sheet of the Catalog Manager for the Payroll query.
- Select the View tab to preview the report. After the report result is shown, go to the Data Manager. You can now see the history of this first run of the query.
- Use the query Payroll to create another page report report1.cls.
- View report1.cls, then the run information will be appended as a record in the Data Manager.
- Open the report.ini file in
<server_install_root>\binand add the command line
- Publish a page report that has its query properties Maximum Rows and/or Maximum Duration set together with its catalog to Logi Report Server.
- Run the report on Logi Report Server. The Server Engine will save the query run information, but does not have a GUI to display it. In order to view the information, you will need to use the Data Manager in Logi Report Designer.
- Start Logi Report Designer. Make sure that you have pointed the dmPath argument in the file report.ini in
<designer_install_root>\binto the output location (containing the dm folder) of Logi Report Server. In most cases you will need to use FTP or remote copy to copy the dm folder from the server machine to the Logi Report Designer machine.
- In Logi Report Designer, use the Data Manager to view the query's server-side run history information.