A common addition to many reports (especially financial reports) is printing total fields (such as total sales) or the number of matching database entries for a group of information. This information is normally placed within a Group Footer report band, so it prints at the end of that related group of database information.

 

 For this example let's assume that we want to print the total number of database record(s) for each state. This information will print at the last page of that group of information as a summary; here's how to do it:

 

¡        Create a Sorting Band on the STATE database field (if one doesn't already exist)
¡        Create a Group Footer report band (if one doesn't already exist) on the STATE database field
¡        Add a new frame inside the new Group Footer report band
¡        Click on the Dictionary button for the new Frame
¡        Underneath the 'User Variables' section of the dictionary will be an entry labeled 'Gather Totals'. Each of the Group Header / Group Footer report bands that you have defined will have an entry here titled 'Group Totals'. Highlight the entry for the STATE database field:

 

_bm76

 

¡        Click the '+' button at the top of the Dictionary dialogue window
¡        A new dialogue box appears to create a new variable based on the selected database field:

 

_bm77

 

 As displayed above, there are many different ways of manipulating the information to be stored in the new variable. Here is a breakdown of each item:

 

¡        Assign Name: Enter the desired name of the variable here. This name MUST be unique; do NOT use the same name as the database field! An easy way of keeping the name unique is by using a prefix, such as LOC; for example, for the database field NAM:STATE a good variable name would be LOC:STATE
¡        Field/expression to total:  Use the Dictionary button to help select the database field(s) that you want to manipulate here.
¡        Picture: Define how the variable will be printed on your report by using the Picture dialogue box.
¡        Total Type: Define how the selected database field(s) will be manipulated. From the droplist you can select Sum, Average, Count, Minimum, Maximum or Evaluate.
¡        Evaluate On: Define when the variable will be modified; from the droplist you can select 'At Each Record Retrieve', 'At The End Of The Group', 'At The End Of The Report' or 'At The End Of Every Page'

 

 Here is the dialogue box already filled out to build the new variable:

 

_bm78

 

 Here is how the dictionary appears after adding the new variable:

 

_bm79

 

 And here is the modified Group Footer report band to make use of the new variable information:

 

_bm80

 

 And an example of what the output will look like:

 

_bm81

 

To recap: on this page you learned:

¡        How to create a variable used in a Group Header / Group Footer band
¡        How to manipulate the characteristics of this new variable (appearance, how information is gathered from the database)
¡        How to combine the Group Header / Group Footer variable with text for printing meaningful information in the report band

 

GOTO PAGE 17

Published by ABCI Software Solutions | ABC ISO Consultants | Community | ISO Certification Services | ISO Resources

Copyright © Access Business Communications, Inc.