Automatic Total Blocks

Applying a break to a column on a report creates an automatic total block, allowing the user to total the data in a column, or separate the data according to specific columns in the report.  Automatic total blocks cannot be modified by the user, except the move the location of the column or block, using the Designer Tool.  

To apply an automatic total, set the Break Type property to the desired setting.  Choices are break on column, page break on column, or automatic totals.

In order to have automatic total blocks created, you need to have at least one column with the Break Type column set to Page Break on Column or Break on Column.  This gives the report the column by which to separate totals.  Once a column has been assigned to be the break column, two automatic total blocks will be created.  One will be named after the break column, and the other will be named REPORT_TOTALS.  Additional columns that have the break type changed will be added to the existing two automatic total blocks.  Columns set to Automatic Totals will be the columns that are actually totaled on the report.

For example, suppose that you wanted to list the item locations on a report and then total the on hand quantity in those item locations for each item.  Your block contains the columns:

item_no

description

stock_area

bin_location

qty_on_hand

Since you want to total the quantity on hand by item, you would set the item_no column break type to Break on Column.

Since you want the quantity on hand to be totaled, you would set the qty_on_hand column break type to Automatic Totals.

Two blocks will be added to the main block. The break block includes the item_no field and the qty_on_hand field, while the automatic totals block contains only the qty_on_hand field.  When run, there will be a break after each item number, totaling the quantity on hand for the columns above it.

Summary Reports

If all of the columns selected from the database are defined as break on columns or automatic total columns, the report becomes in effect, a summary report.

For example, consider a report where you have four columns: customer, item, qty_sold, extended_price.  Suppose that you have set customer and item to be break on columns, and qty_sold and extended_price to be automatic total columns.  

When the report is run, you will get no detail rows, only one summary row for each customer/item combination, containing the total quantity sold for that item, and the total extended price..

If, however, you added invoice number into the report without a break type, you would then get detail lines with that information for each invoice, and one summary line for each customer/item combination.

Modifying Automatic Total Blocks

Only specific properties can be modified for Automatic Total blocks.  You cannot delete the blocks manually.  To remove automatic total blocks, you must modify the Break Type property for the fields in the parent block.  

  1. In the Name property, the name of the block is displayed.  For break blocks, this name is generated from the column name when the block is created.  Automatic total blocks are named REPORT_TOTALS.  The property cannot be modified.

  2. In the Description property, the description for the block is displayed.  The description is generated when the block is created as follows: Pseudo Block for formatting totals from BLOCK_NAME.  This property cannot be modified.

  3. In the Parent property, the name of the parent block is displayed.  This property cannot be modified.

  4. In the Type property, the type of block is displayed as Automatic Totals.  This property cannot be modified.

  5. Set the Body Style pop-list to the style to be applied to the body for this block.  If set to (from parent), the style used will be the Body Style from the report properties.

  6. Set the Editable Field Style pop-list to the style to be applied by default to the editable fields for this block.  If set to (from parent), the style used will be the Editable Field Style from the report properties.

  7. Set the Non-Editable Field Style pop-list to the style to be applied by default to the display only and label fields for this block.  If set to (from parent), the style used will be the Non-Editable Field Style from the report properties.

  8. Set the Link Style pop-list to the style to be applied to links for this block.  If set to (from parent), the style used will be the Link Style from the report properties.

  9. In the Height property, enter the height for the block in the report's defined measurement units.

  10. In the Expand Type pop-list, define the size of the block.  Choices are Expandable, Fixed No Scroll Bars, and Fixed with Scroll Bars.

  1. In the Suppress Total property, select true or false to indicate whether the totals will be suppressed on this block.  When set to true, the total block will not be displayed.  When set to false, the total block will be displayed.

  2. The Created on property displays the date and time on which this block was created and cannot be changed.

  3. The Modified on property displays the date and time on which this block was last changed, and cannot be modified.

  4. When all changes have been made, press the [Save] button in the Main Toolbar.

Xephr is a registered trademark of NDS Systems, LC.

Copyright © 2007 NDS Systems LC.