The REST service allows a job to specify output to remote files through FTP (File Transfer Protocol). In addition to the repository location, you can specify an FTP server and path where JasperReports Server will write the output files when the job runs. You also need to provide a username and password to access the FTP server.
To specify these parameters, add the outputFTPInfo element to the XML job descriptor, as shown in the following example:
<outputFTPInfo>[/code] <serverName>ftpserver.example.com</serverName>[/code] <userName>ftpUser</userName>[/code] <password>ftpPassword</password>[/code] <folderPath>/Shared/Users/ftpUser</folderPath>[/code] </outputFTPInfo> </repositoryDestination> <outputFormats> <outputFormat>XLS</outputFormat> <outputFormat>PDF</outputFormat> </outputFormats> ... </job>[/code] |
FTP output is always specified in addition to repository output, and the output will be written to both the repository and the FTP location. You cannot specify FTP output alone. The file names to be written are the same ones that are generated by the job output, as specified by the baseOutputFilename, sequential pattern if any, and format extensions such as .pdf. Similarly, the file overwrite and sequential filename behavior specified for repository output also apply to FTP output.
Recommended Comments
There are no comments to display.