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.
- On the JReport Console > Resources page, 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 a name for the task in the Schedule Name text box.
- In the Enter Parameters section, for a page report, you need to 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.
- If the report has parameters, specify the parameter values as required.
- 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.
- Expand the Report Information section, click Select Another Catalog to specify another catalog for the report if required.
- Select the report version and catalog version from the corresponding drop-down lists.
- Assign a priority to the task from the Priority drop-down list.
- Expand the Advanced section, if the report has a style group, check the Enable Style Group checkbox and choose the style group.
- Check the Enable Converting Encoding option if required and specify the encoding before and after converting from the corresponding drop-down lists.
- If Enable NLS is available, you can select it and then specify a language to display the report contents with.
- Define the encoding for the report by selecting from the drop-down list.
- Check Use the default DB user and password defined in catalog.
- Check the Add TaskListener to be Invoked option, and input the class name (for details, see
Adding TaskListener).
- Check the Enable Auto Recover Task option to specify auto recovering settings.
- In the Publish tab,
- Click 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.
- If you want to specify a timeout for the task, specify the settings in the Duration tab as required.
- Click Finish to have the task performed.
Then, click My Tasks on the system toolbar. While the task is being performed, you can see a record of it in the Running tab. On completion it will be put into the Completed tab.
Notes:
- When publishing a report to XML format, if you want to use the URL to get the .xsd file, follow the steps below:
- Put the existing XML schema file in
<intall_root>\public_html
.
- Input
http://IP address:8888/name of the existing XML schema file
.
- There is another way to publish the report result to version. If you have set the property server.version.from.temp to true in the server.properties file in
<install_root>\bin
, or selected the option Enable "Publish to Versioning System" for Background Tasks View on the JReport Administration page > Configuration > Advanced panel, you will get the link Publish to Version System on the system toolbar of the JReport Console page. Click the link to publish the result to version.