Conditional Report Delivery And Distribution

DocumentBurster can be used to implement conditional report delivery or distribution.

During the report bursting flow DocumentBurster can check and can distribute (or skip distribution) only those reports which fail (or meet) a specified user defined condition.

Use Case Example

DocumentBurster can be configured to act as a management by exception reporting system which will alert the management team only for the cases where the minimum performance levels are not met.

For example the management of your organization might require for getting each morning:

  • Reports for the sales with very low profit margins or
  • Reports for the transactions with deviations from the approved discounts

Configure DocumentBurster to Implement Conditional Report Delivery

1. skip instruction

By default, if configured to distribute reports, DocumentBurster will deliver to the relevant recipients all reports which are generated during the report bursting process. DocumentBurster can be configured to skip the report distribution by placing a text like <skip>true</skip> in each of the output documents which shouldn’t be distributed.

Note – If configured to distribute reports, DocumentBurster will deliver to the relevant recipients all the reports which are generated during the report bursting process and for which DocumentBurster:

  • Is not able to find any <skip>true</skip> instruction, or
  • Finds a negative skip instruction like <skip>false</skip>, or
  • Doesn’t find any (true or false) skip instruction

Note – Depending on the requirements, the report writer software (i.e. Crystal Reports, etc.) should fill the appropriate <skip>true</skip> instructions into the reports which shouldn’t be delivered.

Usually the value (true or false) from within the <skip>true/false</skip> instructions will be calculated by a formula defined in the report writer engine and will have a business meaning such as:

  • Very low (or negative) profit margins
  • Discounts higher than the maximum approved ones
  • Low inventory levels
  • Production runs with very high scrap rates
  • Any other formula which makes business sense for your organization

Note – The same result can be achieved using the shorter (while being less expressive) pattern <s>true</s>.

2. skip_current_file_distribution_if.groovy

This sample script is an alternative to the previously presented skip instruction and can be used to achieve more complex conditional report delivery scenarios.

DocumentBurster‘s built-in capabilities (skip instruction) can be used to achieve many conditional report delivery and distribution scenarios. The remaining (more complex) situations, which cannot be implemented using the skip instruction, should be implemented using this script.

This script can be used to achieve conditional report delivery in situations similar with the following:

  • The condition to skip the distribution cannot be achieved using a skip report formula (e.g. skip the delivery for files which are bigger than 20MB)
  • The condition to skip the distribution is too complex and it might be better to implement this condition with a script
  • The input report cannot be modified (for whatever reason) to accommodate any skip instruction

skip_current_file_distribution_if.groovy approach is described with more details in Chapter 1. Using scripts to achieve more -> Sample scripts -> skip_current_file_distribution_if.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 any conditional report delivery requirement which your organization might have.