Home Discussions Questions & Answers Pre-Processing Data with Report Triggers

Pre-Processing Data with Report Triggers

Avatar photoCustomer October 7, 2022 at 5:39 am

I need to run an Oracle standard concurrent program, like ‘Depreciation Projection’, to calculate and populate data *before* my main Blitz Report SQL extracts the data. How can I define this prerequisite step within the Blitz Report configuration?

Viewing 8 reply threads
  • Author
    Replies
    • Support October 7, 2022 at 9:44 pm  

      You should use the ‘Before report trigger’ functionality, which is configured within the Report Options section. This trigger points to a custom DB Package that contains pre- and post-processing functions. The functions used within this package must follow a specific naming convention: `afterpform`, `beforereport`, and `afterreport`, and they must return the boolean data type. In the specific case of the FA Depreciation Projection report, the Blitz Report references a custom package (e.g., `XXEN_FASPRJ`) that submits and waits for the completion of the standard Depreciation Projection program *before* the main report SQL executes.

    • Avatar photoCustomer October 8, 2022 at 5:07 am  

      Besides pre-processing, what else can the triggers be used for?

    • Support October 9, 2022 at 11:42 pm  

      The triggers can be used for various data pre- and post-processing activities. For example, the ‘Before report trigger’ can be used for activities such as table data updates that must occur before the extraction SQL is run. Conversely, the ‘After report trigger’ can be utilized for post-execution processing, such as calling standard Oracle PL/SQL code or cleaning up temporary data.

    • Avatar photoCustomer October 11, 2022 at 7:50 am  

      Can I also define a custom shell script to run on the application server immediately after the report finishes, for distribution purposes?

    • Support October 13, 2022 at 9:54 am  

      Yes, you can define a custom Unix shell script to be executed after the report completion, typically for tasks like file distribution or transformation. This is configured via the ‘Custom Postprocess’ option found both at the report level and as a runtime option. The script must reside in the `$CUSTOM_TOP/bin/custom/` directory (e.g., `$XXEN_TOP/bin/custom/generate_and_send_pdf.sh`) and is invoked with several run-time parameters, including the report name, request ID, and the path to the output file.

    • Avatar photoCustomer October 15, 2022 at 10:05 am  

      How do I ensure data security if my report uses ‘all’ tables like `ap_invoices_all` instead of the VPD-secured synonyms?

    • Support October 15, 2022 at 5:57 pm  

      For maximum flexibility and maintainability, it is actually recommended to use `_all` tables and apply security through parameters. Security is implemented by introducing a required parameter, such as ‘Operating Unit’, with a List of Values (LOV) restricted to only the operating units allowed by the current user’s responsibility. This approach allows the database connection to run without having the application user session context fully initialized, making debugging via tools easier.

    • Avatar photoCustomer October 17, 2022 at 3:56 pm  

      What about using Oracle’s native Virtual Private Database (VPD) if we need to secure sensitive payroll columns?

    • Support October 18, 2022 at 5:03 am  

      You can absolutely use Oracle VPD with Blitz Report to control access to sensitive data at the row or column level. Blitz Report provides several objects to manage this, including the lookup `XXEN_REPORT_VPD_POLICY_TABLES` to define the objects to be secured, and concurrent programs like ‘Blitz Report Update VPD Policies’ to activate the policies. However, remember that VPD policies set up this way only secure access through the Blitz Report concurrent program itself, not through direct database access tools.

Viewing 8 reply threads
  • You must be logged in to reply to this post.

Login with: