Jump to content
We've recently updated our Privacy Statement, available here ×
  • JasperETL: schedule report and encrypt its output


    dnaboka
    • Features: Scheduler Version: v6.2.1, v6.0.1 Product: Jaspersoft® ETL

    TIBCO JasperReports® Server out-of-the-box configuration doesn't support report output encryption. This is a demo on how to workaround this limitaion using Jaspersoft ETL Studio:
    2017-03-07_1147.png.7c0a00814aa022c0467df9ec6a20e968.png

    Our job consists of 4 components:

    1. tREST
    2. tWaitForFile
    3. tFileArchive
    4. tSendMail
    1. We start by creating an "immidiate" job using REST API. For this example, we will export sample /public/Samples/Reports/01._Geographic_Results_by_Segment_Report report to PDF/XLSX/CSV formats with timestamped filenames. Files will be stored on local filesystem, but you can use FTP/SFTP/FTPS as well. A PUT request to "http://localhost:8080/jasperserver-pro/rest_v2/jobs/" is made. You can find more information about body contents in Web Services guide

      Every special character in HTTP Body has to be escaped. Two headers need to be set:

    2. "Content-Type" = "application/job+json"
    3. "Authorization" = "Basic c3VwZXJ1c2VyOnN1cGVydXNlcg=="

      String value consists of two parts, "Basic " + Base64 encoded value "username:password". In this case, superuser:superuser is used. You can easily encode your custom credentials here:
      https://www.base64decode.org/
      2017-03-07_1148_001(1).png.7bfb3769e12a9ced8d50934fd49b69cc.png

    4. Next we wait for files to be created on filesystem. When files are created (e.g. in "D:/downloads/ETL/JETL-20160704_1411-V6.2.1/workspace/JRS_scheduled_reports" folder), we exit the scanning loop and proceed to encryption part.
    5. We are creating a ZIP file using certain Filemask (e.g. only PDF/XLSX files) and set a password (e.g. "password") for this ZIP file (e.g. "D:/downloads/ETL/JETL-20160704_1411-V6.2.1/workspace/JRS_scheduled_reports/report_output.zip").

      2017-03-07_1149.png.c585f99ca54de750c6d60f7fe4f3e36a.png

    6. Finally, we email ZIP file to specified recipients. Job execution is finished

    2017-03-07_1147.png.2a431bb5cd275b9ffd251b41b5cc509f.png

    2017-03-07_1148_001(1).png.d3523b303555748bcd24e5d1f98e5fe6.png

    2017-03-07_1149.png.f1a9984ba64fcc97c2fcad49bfcc44da.png

    schedule_jrs_encrypt_0.zip


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...