Fetch Report Bursting Data From External Datasources

DocumentBurster can fetch report bursting and report distribution meta data from external data-sources such as relational databases or files.

This is particularly valuable in situations when the data required for report distribution in not fully contained in the input report but is available and can be fetched from external data-sources.

Example

You might need to distribute invoices to your clients. DocumentBurster will be able to break up the input report for each invoice_id however, for example, the email address for the intended recipients might not be available in the input report itself. For solving situations like this, during the report bursting flow, DocumentBurster can be configured to fetch each required (client) email address from an external data-source (e.g. database, file, etc.).

While it is possible to fetch the report bursting meta data from any external data-source, out of the box DocumentBurster ships with two sample scripts demonstrating the most common scenarios:

  • fetch_distribution_details_from_database.groovy sample script which shows how to fetch the report bursting data from a relational database
  • fetch_distribution_details_from_csv_file.groovy sample script which shows how to fetch the report bursting data from a CSV text file

1. fetch_distribution_details_from_database.groovy

Using this sample script DocumentBurster can fetch the report bursting and report distribution details from an external database. Once fetched the details are populated into the $var0$, $var1$, etc. user variables in order to be further used by DocumentBurster.

This sample script is demonstrating how to connect to an HSQLDB database, however you can modify the connection details for:

  • Oracle database
  • Microsoft SQL Server, Microsoft Access or Microsoft FoxPro database
  • IBM DB2 or IBM AS/400 database
  • PostgreSQL, MySQL, SQLite, Apache Derby or FireBird database
  • Teradata database

Complete documentation about fetch_distribution_details_from_database.groovy script can be found in Chapter 1. Using scripts to achieve more -> Sample scripts -> fetch_distribution_details_from_database.groovy from the DocumentBurster – Advanced report delivery scenarios document.

2. fetch_distribution_details_from_csv_file.groovy

Using this sample script DocumentBurster can fetch the report bursting and distribution meta-data details from an external (CSV) file. Once fetched the details are populated into the $var0$, $var1$, etc. user variables in order to be further used by DocumentBurster. This script is reading the information from a CSV file with a specific format, however the script can be modified to parse and read other text files which might have a different format.

Complete documentation about fetch_distribution_details_from_csv_file.groovy script can be found in Chapter 1. Using scripts to achieve more -> Sample scripts -> fetch_distribution_details_from_csv_file.groovy from the DocumentBurster – Advanced report delivery scenarios document.

Feel free to download DocumentBurster and see for yourself how this software can be used to implement the most difficult and specific report bursting and report distribution requirements.