Language:


Adding a Secondary Register - Printing Information from the Secondary Register

Having added a secondary register and linked it to the primary register, you now need to specify what information from the Invoice register is to be printed in the report. In the example Customer list, the Invoice Number and Date, Due Date and Total will be printed, as will the Customer Number as a check that the report is working correctly.
  1. Change to the 'Layout' card:

    Four new sections have been added to the report layout allowing you to print information from the Invoice register. These sections are added automatically.

    The ten sections will be printed in this order:

    Header
    Contact Header
    Contact Before
    Invoice Header
    Invoice Before
    Invoice After
    Invoice Footer
    Contact After
    Contact Footer
    Footer
    The Contact Before and Contact After sections will be printed once for each Customer, thus building up the list of Customers. The Invoice Header and Invoice Footer sections will also be printed once for each Customer, while the Invoice Before and Invoice After sections will be printed once for each Invoice. The other sections will be printed once per report.

    The new Invoice Header, Invoice Before, Invoice After and Invoice Footer sections are connected to the Invoice register. You can place fields from the Invoice register in these sections, but not fields from any other register.

  1. The next step is to add the column headings that will identify the Invoice information. Click on the Invoice Header section (marked "Invoices vrInvoice Header" in the example) and then use the [Text] button as described here to add the column headings:

    You can also increase the Line height as described here to increase the space given to the Invoice column headings.
  1. Now add to the report the fields that contain the information that you want to be printed in the report. Click once on the Invoice Before section (marked "Invoices vrInvoice Before" in the example) so that it changes to a darker shade of grey. Then use the [Field] button as described here to add the appropriate fields from the Invoice register to that section:

    "Sum1" is the internal name for the field in the Invoice register that contains the Invoice Total (excluding VAT). This figure has been right justified.
  1. Now you can add a total figure to show the Invoice Total for each Customer. This should go in the Invoice Footer section, as that is printed once per Customer (the Invoice After section is printed once per Invoice). Click on the Invoice Footer section (marked "Invoices vrInvoice Footer" in the example) to select it, and then click the [Total] button. The 'Total' dialogue box opens:

    Field
    Paste Special    Fields in the register
    Choose the field that you want to be totalled. The 'Paste Special' list will show all the fields in the register you are working with (in this case, the Invoice register).
    You can also enter "1" here. Instead of totalling a field, this will cause the total to count the number of records printed in the report. This is described in more detail here.

    Clear on print
    Use this option if you do not want the total to be cumulative (i.e. if you want the total to be set back to zero each time it is printed). In the example, you should use this option if you want to print a total for each Customer.

    Left
    Specify here where the left-hand edge of the total is to appear on the page, by entering a number of pixels from the left-hand edge of the page. If you're not yet sure where you want the total to appear, don't change the default. You will be able to move the total later by clicking and dragging. To align the total with the field being totalled, enter the same left and right measurements here as you did for the field.

    Right
    Specify here where the right-hand edge of the total is to appear on the page, by entering a number of pixels from the left-hand edge of the page.

    Style
    Paste Special    Styles setting, System module or Style register, Report Generator module
    Use this field to assign a font and font style to the total. If you do not enter a Style, the font and font size specified in the Company Info setting in the System module will be used.

    Variable Name
    The total figure will be calculated and printed, but it will not be stored anywhere. This means you cannot use the figure elsewhere in the report. If you want to use the figure elsewhere, you need to copy it into a variable. Specify the variable here. The variable must already exist i.e. you must have declared it as a decimal or integer (depending on the field being totalled) on the 'Data' card. Declaring a variable is described here.

    Condition
    Subject to the Only On Print option immediately below, every record printed in the report will contribute to the total. You can use this field to specify that a record will only contribute to the total if it meets a certain condition. For example, you may not want Invalidated Invoices, unapproved Invoices or Credit Notes to contribute to the total. Please refer to the Printing Objects with Red Line Overstrikes page for an example.

    An example situation where this field will be useful is in a list of Invoices. Credit Notes will be shown in such a list with positive values. So, if the list has a single total figure with no condition, Credit Notes will be added to the Customer's total Invoice value when they should be subtracted. To avoid this problem, use the condition to calculate separate totals for Invoices and Credit Notes, then copy the two totals into variables as described under Variable Name above, and finally use the [Formula] button to subtract one from the other to display a turnover figure.

    Only on print
    At the moment the example report lists every Invoice belonging to each Customer. Therefore, every Invoice contributes to the total. However, you may choose to change the report so that some Invoices are not printed. For example, you may put in a condition that an Invoice is only printed in the report if its value is greater than 100.00. You can do this using the [Print If] button on the 'Data' card. Use this option to specify whether the Invoices that are not printed in the report (those whose value is less than 100.00) should contribute to the total. In the example report illustrated at the end of this section, Customer 001 has two Invoices whose values are greater than 100.00. The total value of these two Invoices is 1109.00. The total shown in the report for Customer 001 will be 1109.00 if you use the Only On Print option, and 1239.00 if you do not use this option.

    Overstrike
    You can have the total printed with a red line drawn through it, depending on a condition that you enter here. This is described in more detail on the page.

    Justification
    Use these options to choose whether the figure is to be left- or right-justified. Usually figures should be right justified.

    Decimals
    If you want to round the total to a particular number of decimal places, enter that number here.

    When you click [OK], the total is placed in the correct position in the report. In the illustration, we have also added some identifying text and an empty Line (in which we have used the Always Print option) underneath the total:

    This is the resulting report. We have added an accumulated total to illustrate the effect of not using the Clear On Print option in the 'Total' dialogue box:

For more information about totals and break points, please refer to the Break Points, Subtotals and Totals page. Please click the links below for more details about: