Summing Up Different Currencies

Use

When printing tables you can execute calculations on two ways:

  1. The Calculations tab of the table node supports the operations Total, Average Value, and Number on application data.

    See: Calculations

  2. You can execute calculations manually using program lines nodes. However, this is necessary only for calculations on values that can have different currencies or measurement units.

This section, as an example, describes how to sum up different currencies:

  • How to calculate subtotals according to a certain sort criterion and display them separately by currencies
  • How to calculate a grand total on different currencies and display it at the end of a table
  • How to calculate a subtotal of the grand total on different currencies and display it before a page break

You can use these calculations for printing old tables as well as for the new table nodes (see: Printing Tables).

Integration

You usually calculate totals within data loops of the loop or table nodes. For grand totals or subtotals of the grand totals at the end of a page use the footer for output. The output control of the footer (see: Processing Loops and Tables) in this case requires a calculation of the total that is in sync with the output.

For subtotals by sort criterion use events for summing that are triggered after a break in the sort level.