PDF - Exporting a Report Automatically
The following example, for Logi Info only, shows how to create a process task that exports data automatically:
- In your Process definition, add a Procedure.ExportPDF element beneath your Task element.
- In the element's Filename attribute, specify the output path and filename, on the web server, for the exported report. The filename should include the ".pdf" file extension. For example, this value uses a token to export the report to a folder called myExports within your project folder: @Function.AppPhysicalPath~\myExports\myfile.pdf
- Add the required Target.PDF element.
- In the element's Report Definition File attribute, you must specify the report to be exported (a blank value is not allowed). The CurrentReport option in the suggested values is not valid in this case, which means that the report will be exported but will not reflect any sort order that the user may have applied before clicking the export link.
- If you wish to export only a specific Data Table, provide its ID in the Export Data Table ID attribute. This prevents anything else in the report, such as headers or footers, images, etc., from being exported.
When your task runs, the specified report will be exported to a temporary file in your project folder's rdDownload folder on the web server; the temp file is then copied to your output file. The file is not opened in your browser automatically.