Scheduling Tasks to Publish Reports
You can schedule tasks for a specified report to publish the report result to various formats as follows:- Do either of the following to open the
Schedule dialog.
- In the server resource tree in the Logi JReport Server console, browse to the report you want to schedule to run, then:
- Put the mouse pointer over the report row and select the Schedule button on the floating toolbar.
- Select the report row, right-click in the row and select Schedule from the shortcut menu.
- Select the report row and select Run > Schedule on the task bar of the Resources page.
- In the Logi JReport Server console, select My Tasks on the system toolbar, then select the Scheduled tab. Select New Schedule on the task bar of the My Tasks page, then in the New Schedule dialog, check the Select Report to Create Schedule radio button, specify the folder and then the catalog in which the report you want to schedule to run is saved, then select the report and select OK.
- In the Logi JReport Server Start Page, select Schedule in the Manage category, the My Tasks page with the Scheduled tab selected is displayed. Select New Schedule on the task bar of the My Tasks page, then in the New Schedule dialog, check the Select Report to Create Schedule radio button, specify the folder and then the catalog in which the report you want to schedule to run is saved, then select the report and select OK.
- In the server resource tree in the Logi JReport Server console, browse to the report you want to schedule to run, then:
- In the General tab,
- Specify the name for the task in the Schedule Name text box.
- For a page report, select the report tabs you want to run from the page report. You can choose multiple normal report tabs or one bursting report at a time (for scheduling a bursting report, see Scheduling a Task Containing a Bursting Report). When multiple normal report tabs are selected, check Export to One File if you want to export them to just one result file. The report tabs will be exported in the list order. You can change the order of the report tabs by selecting and .
- If there are multiple dynamic connections available, expand the Select Dynamic Connection section and select a connection from the drop-down list. Select Connection Properties to view the connection information if needed.
- Expand the Report Information section, select Select Another Catalog to specify another catalog for the report if required, and select the report version and catalog version from the corresponding drop-down lists (the catalog and report/catalog version cannot be changed if the report is a shared report).
Assign a priority to the task from the Priority drop-down list. The Priority property is available to administrators only and the priority levels are from 1 to 10 in ascending order of lowest priority to highest priority (by default this property is ignored unless server.properties is modified to set queue.policy not equal to 0).
- Expand the Advanced section to configure some advanced settings for the report.
Specify the style group for the report.
Check the Enable Converting Encoding option and specify the encoding before and after converting from the corresponding drop-down lists.
If the report is defined with NLS, check Enable NLS then specify a language to display the report contents in.
Define the encoding for the report by selecting from the Encoding drop-down list.
Specify the DB user and password with which to connect to the data source. You can either use the default ones defined in the catalog or specify another DB user and password.
Check the Add TaskListener to be Invoked option to call a Java application before/after the report runs so as to obtain information about the report task (for details, see Applying TaskListener).
If you are in a cluster environment, you can also directly specify an active server in the cluster to perform the schedule task via the Specify a preferred server to run the task option.
If you want to enable task recovery, check Enable Auto Recover Task, then specify the maximum number of times in which to retry running the task in order to recover it, the time interval between the retries, and whether to recreate all or just the failed results when you publish the task to multiple formats.
The default on-screen filter values you have saved in the report will be automatically used to run the report. If you do not want to apply the filter conditions, uncheck Use User-Defined Default On-screen Filter Values.
- In the Parameter tab, specify the parameter values if the report has parameters.
- In the Publish tab, specify the type of the task.
Six task types are provided by Logi JReport Server: To Version, To Disk (unavailable to organization users), To E-mail, To Printer, To Fax and To FTP. Choose the types you want to publish, select the report formats for each type and set the other settings as required.
- In the Conditions tab,
- In the Time sub tab, specify the time zone and the time for when the task is to be performed.
- To run the task as soon as you submit it, select Run this task immediately from the Time Type drop-down list.
- To run the task at a specified time, select Run this task at, then define the time according to your requirement.
- If you want to run the task repeatedly, select Run this task periodically, then specify the duration, date and time accordingly. To add an exception date on which you do not want to run the task, select Show Exception, then select the Add button and in the Select Condition dialog select the date as required. You can add several exception dates as you want. To remove an exception date, check it in the exception date box and select Remove.
When you select to run the task at a specified time or repeatedly, check Run missed task upon server restart so as to run the missed tasks when you restart the server if needed.
- If you want to bind a trigger to the task, switch to the Trigger sub tab (triggers can only be fired by administrators, for more information, see Managing Triggers).
From the Select a trigger to bind drop-down list, select the required trigger or select the New Trigger button to create a new trigger in the New Trigger dialog (the button is not available to organization users), then specify the trigger logic with time condition.
- Trigger Only
Performs the task only when the trigger is fired. - Trigger and Time Condition
Performs the task when both time is up and the trigger is fired.Note: When this logic is selected:
- No matter which condition is ready, the task can only be performed when its counterpart is ready.
- If you specify the task to be performed at a specific time, you must check the option Run missed task upon server restart, otherwise the task will be regarded as expired and will be deleted when the time condition is ready before the trigger condition.
- Time Condition after Trigger
Performs a task when time is up after the trigger is fired. If the time condition is ready before the trigger condition, the task will be regarded as expired and will be deleted. - Time Condition or Trigger
Performs the task when either time is up or the trigger is fired.
- Trigger Only
- In the Time sub tab, specify the time zone and the time for when the task is to be performed.
- In the Notification tab, select an e-mail address from the Mail To box to notify someone via e-mail of when the task is finished successfully or when it fails. If you haven't sent any mail notification before, the Mail To box is empty. Select the New button to create an e-mail address. To send out mail notification, an e-mail server must have been predefined by the administrator.
- If the Duration tab is available, specify a time duration for the task, and ask Logi 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.
- Select Finish, and Logi JReport Server will then perform the task.
The following are some specific scheduling examples:
- Example 1: Publishing a report to the versioning system
- Example 2: Publishing a report to disk
- Example 3: Publishing a report to e-mail
- Example 4: Publishing a report to printer
- Example 5: Publishing a report to fax
- Example 6: Publishing a report to an FTP site
Example 1: Publishing a report to the versioning system
In this example, a task is set up and will be performed immediately. The generated result is asked to be kept for 30 days.
- In the server resource tree in the Logi JReport Server console, select the report row, right-click in the row and select Schedule from the shortcut menu to display the Schedule dialog.
- In the General tab, specify the general report settings.
- In the Parameter tab, specify the parameter values as required if the report has parameters.
- In the Publish tab,
- Select the To Version sub tab, then check Publish to Versioning System.
- Select the required formats and set the format settings.
- Check the Built-in Version Folder option in Archive Location to save the report result version in the built-in version folder.
- Set 0 for the Maximum Number of Versions.
- Check the Result Auto-delete option and define the result to expire in 30 days.
- In the Conditions tab, select the Time sub tab, define the time zone from the Time Zone drop-down list, then from the Time Type drop-down list, choose Run this task immediately.
- If you want to notify someone of when the task is finished by sending an e-mail, go to the Notification tab and then set the settings.
- Select Finish to have the task performed.
Then, select My Tasks on the system toolbar. While the task is being performed, you can see a record of it in the Running table. On completion it will be put into the Completed table.
Notes:
- When scheduling to publish a page report to the versioning system, the Page Report Result and JReport Result formats are based on the report level, that is the report with all selected report tabs will be output to a single file no matter Export to One File in the General tab is checked or not.
- There is another way to publish the report result to version.
- Set the property server.version.from.temp to true in the server.properties file in
<install_root>\bin
, or select the option Enable "Publish to Versioning System" for Background Tasks View in the Administration > Configuration > Advanced page in the Logi JReport Server console. - Run a report in the Advanced mode, select a format other than Page Report or Web Report in the Format tab. Specify other settings as required. Then select Finish.
- In the view page, you will see a link Publish to Versioning System at the upper-left corner. Select the link to publish the report to version in the current format.
- Set the property server.version.from.temp to true in the server.properties file in
Example 2: Publishing a report to disk
In this example, you will learn how to set up a task to publish the report result in various file formats to the file system repeatedly at the start of each month. It is not available to organization users.
- In the server resource tree in the Logi JReport Server console, select the report row, right-click in the row and select Schedule from the shortcut menu to display the Schedule dialog.
- In the General tab, specify the general report settings.
- In the Parameter tab, specify the parameter values as required if the report has parameters.
- In the Publish tab, select the To Disk sub tab, check Publish to Disk, then select the required formats, specify the result locations, and set the format settings according to your requirements. You can apply dynamic names for the result if necessary.
- In the Conditions tab,
- In the Time sub tab, define the time zone from the Time Zone drop-down list, then from the Time Type drop-down list, choose Run this task periodically.
- In the Duration box, specify a time period for when the task will be performed.
- Select Monthly from the Date drop-down list and keep the default to run the first day of every 1 month.
- Keep the Time settings as default.
- If you want to notify someone of when the task is finished by sending an e-mail, go to the Notification tab and set the settings.
- Select Finish to have the task performed.
Then, select My Tasks on the system toolbar, you will see that the scheduled task has been recorded in the Scheduled table. Since you have not specified the duration Run until a time for this task, it will not stop being performed until you delete or disable it from the Scheduled table.
Notes:
- When scheduling to publish a page report to disk, the Page Report Result and JReport Result formats are based on the report level, that is, the report with all selected report tabs will be output to a single file no matter Export to One File in the General tab is checked or not.
- When you specify to publish the report result to the server resource tree, if the specified folder has a real path, the result will be put to the real path. Otherwise it will be put to the default disk location where server resources are.
- If you specify to publish the report result to a non-existent folder on disk, Logi JReport Server will automatically create it.
Example 3: Publishing a report to e-mail
Before you can e-mail the report result, an e-mail server must have been predefined by the administrator.
In this example, you will learn how to set up a task to publish the report result to e-mail.
- In the server resource tree in the Logi JReport Server console, select the report row, right-click in the row and select Schedule from the shortcut menu to display the Schedule dialog.
- In the General tab, specify the general report settings.
- In the Parameter tab, specify the parameter values as required if the report has parameters.
- In the Publish tab, select the To E-mail sub tab, then from the Mail To list, select to whom the report result will be sent. If required, select the Edit button to edit the specified e-mail.
If you want to create another e-mail, select the New button, then fill in every field, select the format in which you want to export the report result and set the settings according to your requirements. When you choose to specify a report result as an attachment to e-mail, you need to specify a file name for the attachment. You can apply dynamic names for the result if necessary.
- In the Conditions tab, select the Time sub tab, define the time zone from the Time Zone drop-down list, then from the Time Type drop-down list, choose Run this task immediately.
- If you want to notify someone of when the task is finished by sending an e-mail, go to the Notification tab and set the settings.
- If you want to specify a timeout for the task, specify the settings in the Duration tab as required.
- Select Finish to have the task performed.
Then, select My Tasks on the system toolbar. When the task is being performed, you can see a record of it in the Running table and on completion it will be put into the Completed table.
Example 4: Publishing a report to printer
In this example, you will learn how to set up a task to publish the report result to a printer.
- In the server resource tree in the Logi JReport Server console, select the report row, right-click in the row and select Schedule from the shortcut menu to display the Schedule dialog.
- In the General tab, specify the general report settings.
- In the Parameter tab, specify the parameter values as required if the report has parameters.
- In the Publish tab,
- Select the To Printer sub tab and then check Publish to Printer.
- Select a JDK print method for the report result in the Select Print Method field.
- Type a name with the path of the printer in the Printer field.
- Specify other options according to your requirements.
- In the Conditions tab, select the Time sub tab, define the time zone from the Time Zone drop-down list, then from the Time Type drop-down list of the Time tab, choose Run this task immediately.
- If you want to notify someone of when the task is finished by sending an e-mail, go to the Notification tab and set the settings.
- If you want to specify a timeout for the task, specify the settings in the Duration tab as required.
- Select Finish to have the task performed.
Then, select My Tasks on the system toolbar. When the task is being performed, you can see a record of it in the Running table and on completion it will be put into the Completed table.
Note: When there is no printer connected with Logi JReport Server, and you schedule to publish a report to a printer, the server may crash or throw an exception.
Example 5: Publishing a report to fax
Before you can fax the report result, the fax settings must have been predefined by the administrator.
In this example, you will learn how to set up a task to publish the report result to fax.
- In the server resource tree in the Logi JReport Server console, select the report row, right-click in the row and select Schedule from the shortcut menu to display the Schedule dialog.
- In the General tab, specify the general report settings.
- In the Parameter tab, specify the parameter values as required if the report has parameters.
- In the Publish tab, select the To Fax sub tab, check the Publish to Fax option and then fill in every field and set the settings according to your requirements.
- In the Conditions tab, select the Time sub tab, define the time zone from the Time Zone drop-down list, then from the Time Type drop-down list, choose Run this task immediately.
- If you want to notify someone of when the task is finished by sending an e-mail, go to the Notification tab and set the settings.
- If you want to specify a timeout for the task, specify the settings in the Duration tab as required.
- Select Finish to have the task performed.
Then, select My Tasks on the system toolbar. When the task is being performed, you can see a record of it in the Running table and on completion it will be put into the Completed table.
Example 6: Publishing a report to an FTP site
In this example, you will learn how to set up a task to publish the report result to an FTP site.
- In the server resource tree in the Logi JReport Server console, select the report row, right-click in the row and select Schedule from the shortcut menu to display the Schedule dialog.
- In the General tab, specify the general report settings.
- In the Parameter tab, specify the parameter values as required if the report has parameters.
- In the Publish tab,
- Select the To FTP sub tab.
- Select the New button to set up a new FTP site or select the Edit button to edit a specified FTP site in the FTP To list.
- Fill in every field, select the format in which you want to send the report result and then set the settings according to your requirements.
- In the Conditions tab, select the Time sub tab, define the time zone from the Time Zone drop-down list, then from the Time Type drop-down list, choose Run this task immediately.
- If you want to notify someone of when the task is finished by sending an e-mail, go to the Notification tab and set the settings.
- If you want to specify a timeout for the task, specify the settings in the Duration tab as required.
- Select Finish to have the task performed.
Then, select My Tasks on the system toolbar. When the task is being performed, you can see a record of it in the Running table and on completion it will be put into the Completed table.