|
Tutorial - Page 17 |
Top Previous Next |
|
Printing dollar totals for a group of database information is very common in financial reports (i.e. What are the total dollar sales for all customers in a state?). The concepts described in the previous tutorial page are practically the same, with some slight changes to achieve the desired result:
* NOTE * Remember that the variable LOC:StateTotal will be containing the SUM of the NAM:Sales database field! This means that the variable will most likely be larger (potentially MUCH larger) than the largest database entry; when assigning the Picture for the variable MAKE SURE you increase it's length to accomodate this situation. Otherwise your data contained in the variable may be incorrect due to truncation! * NOTE *
After saving the new variable information your Dictionary screen will be updated:
And here is the Report Formatter screen:
And some sample output:
Naturally the database field for sales for each customer could be added to the Detail report band; one could also change the Picture for the "Total Sales" to include a leading dollar sign symbol. In fact, let's also add some lines to this report band to really spruce it up:
As shown above, the Sales information for each database record was added. Also added were a top border for the first frame (Total Records For The State) and a bottom border for the second frame (Total Sales For The State) located inside the Group Footer report band.
To recap: on this page you learned:
|