Add the Sections for the C Record Type (Header and Footer Sections)

The C record type contains the number of payees (B records) as well as the sum of all payments made by the payer.   Therefore, Header and Footer sections will be created which will count the number of B records and will sum the payment amounts in the B records.  

Note: Although the B_Count variable also contains the number of B records and could be used here, the value will be computed again to demonstrate how Header and Footer Sections are used to count and sum data contained in details records.

Add a Header Section

Add a Header Section, name it “B Header”, set Detail Section to “B Record”, and uncheck the “Print this section” box.

The Header Section added to the report structure and given the name "Header."  The B record is selected as the corresponding Detail Section.

No fields will be placed in the Header Section, which is why the section is not to be printed.   Note the image of a printer with an X do not print icon, which indicates that the section is not to be printed.    Header and Footer Sections are used to group information in the Detail Section surrounded by the Header and Footer Sections in the same fashion as is used for the Banded Report Header and Footer Bands.  You can group the data in the Detail Section by selecting one of the available functions that are displayed when clicking the ellipsis in the “Group by” field.  The Expression Builder will be launched where you can create the expression used as the criteria for grouping.

This example does not require the B Records to be grouped since the order of data in this case is immaterial.

Add a Footer Section

A Footer Section will be added to count the number of detail (B) records and to sum the payment amounts in the B Records. COUNT and SUM expressions will be added to the Footer.  The footer section becomes the C Record Type and will be printed.

Add the Footer Section and select “Header” as the Header Section that this Footer is associated with as shown in the figure below.  Name the Section “C Record”.

Footer Section that is used for the C Record Type.  The section is named C Record.

Add the fields to the C Record

  1. Add the Record Type, Payment Year, Record Sequence Number fields by copying them from other sections and pasting them into the C Record.
  2. Add a COUNT expression, right align, and name it TotalBRecords. 
  3. Select “B Record” for the Controlled by Detail Section field.
  4. Add a SUM expression by clicking the down arrow next to the blue plus icon and selecting Add EZ Expression Field >> SUM >> ArgosData >> TotalCost. This will sum the TotalCost fields in the B Records.
    The SUM function being added to the Footer Section. This shows the menu progression from add e z expression field to sum to argos data to total cost.
  5. Align left and set the width to 18.
  6. Select “B Record” for the “Controlled by Detail Section” field such that the SUM expression will sum only values from the B section. 

The figure below shows all of the fields after being added to the C Record.

The C record with all fields added. The sum argos data field is highlighted showing the options that are chosen for the field. The name is auto populated, the width is 18, it is left-aligned, it is controlled by the B record detail section, and the expression is autofilled.