Running reports

If you know the default format for viewing reports and this format is what you expect, use direct running. If you would like a different view format or to customize some other information such as parameter values, the running priority, how to save the result, the expiration time, and so on, use advanced running.

Direct running

Direct running reports is to use the default format setting to view the report result. For page reports (for example, .cls) the default format is Page Report and they will run in Page Report Studio. For web reports (.wls) they will be opened in Web Report Studio by default.

If the reports are created on JReport Server, the default format is controlled by the Default Format for Viewing Report option in the Profile > Customize Server Preferences > General tab. When this option is set to Page Report or Applet, web reports will run in Web Report Studio by default.

If the reports are created using JReport Designer, the default format is controlled by the Default Format for Viewing Report property in the Report Inspector. If this property is set to <Server Setting>, the viewing format will be determined by the above setting on server. For page reports this property is available to each report tab in the reports, while for web reports it is available to each report.

Since a page report can contain multiple report tabs and these report tabs may have different default format settings, for example, report tab 1 is Page Report, tab 2 HTML and tab 3 Excel. In this case, there will be different direct running results according to which report tab was the last-time focused tab in the page report when the page report was saved at report design time. If it was report tab 1, all the tabs in the page report will be opened in Page Report Studio. If it was report tab 2 or 3, only tab 2 or 3 will be displayed, and this applies to all the other formats except Page Report.

To directly run a report, on the JReport Console > Resources page, browse to the report, then do one of the following:

Then, if the report contains parameters, the Enter Parameter Values dialog will be displayed. Specify the parameter values according to your requirements.

Advanced running

  1. On the JReport Console > Resources page, browse to the report you want to run.
  2. Do either of the following:

    The Advanced Run dialog is then displayed.

  3. In the General tab, for a page report, you need to select a report tab in the page report you want to run (only one report tab in a page report can be run in Advanced mode at a time). If the report has parameters, specify the parameter values. If there are multiple dynamic connections available, expand the Select Dynamic Connection section and select a connection from the drop-down list. Click Connection Properties to view the connection information if needed. Then, specify the other options as required.
  4. In the Format tab, choose a format to view the report result, and set the other settings.
  5. In the Archive tab, archive the report result version according to your requirements.
  6. If you want to limit the amount of time that the report is allowed to run, in the Duration tab, specify a time duration for the task, and ask JReport Server to cancel the task or to notify you or someone else of the task status via e-mail if the task has not yet finished running when the task duration is up. For detailed information, see Task-level timeout for advanced run and schedule tasks.
  7. Click Finish to view the report in the format you specified.

    When running a page report in Page Report Studio, the report processing page will appear, on which you can choose to cancel the running of the report, or to make the report run in background mode. Click Cancel on this page if you decide to cancel, Background if you want the report to run in background mode, or just wait for processing to complete. If you cancel the report from running, you can choose whether to cancel the running query used by the report in the database at the same time by configuring the JdbcDriversConfig.properties file. For details, refer to Canceling running query.

See also Advanced Run dialog for details about options in the dialog.

Notes:

Running a page report in background mode

When you run a report in Page Report Studio, if the report contains a large amount of data, you need to wait several minutes before the report results are displayed, and during this period, you have to remain on the report processing page, or choose to cancel the run. Now JReport enables you to switch running page reports to background mode.

To make a report running in Page Report Studio to run in background mode, on the report processing page, click the Background button.

You can also specify to run page reports automatically in background mode after a specified time period by setting preferences. To do this:

  1. On the JReport Administration page, click Profile on the system toolbar and then select Customize Profile from the drop-down menu. Or on the JReport Console page, click Profile on the system toolbar, then click Customize Profile on the task bar of the Profile page.
  2. Click the Page Report Studio > Properties > Advanced tab.
  3. Check Background Mode Timeout and specify the time allowed for a page report to run in foreground mode.
  4. Save the settings, then when a report runs in Page Report Studio and the results have not yet been generated after the specified time, it will be automatically switched to run in background mode.

Reports running in background mode are listed in the Background Tasks table of the My Tasks page, which shows detailed running information of the reports, such as report path and name, catalog path and name, running format, time when the task is started/completed, and so on. Also, you can control the status of the reports running in background mode according to your requirements. For example, you can choose to delete, stop, or restart tasks (for details, see Managing tasks in the task tables).

When a report completes running in background, you can open it from the Background Tasks table, and once the report is opened, the task will automatically be removed from the table.