Calculations in reports
Calculations can be added in reports in several ways.One of the easiest ways of incorporating calculations in reports is to have the calculation set up in a query. The advantage of using this method is that when the report is being set up it will be used in exactly the same way as the other fields and so no special set up is required. But calculations set up in queries do not always meet the needs of the calculation required.
When calculations need to be set up in a report then decisions need to be made as to where the calculation needs to be set up. Is it in the:
• Detail section group
• The Group section (header or footer)
• The Page section (header or footer)
• The report section (header or footer)
If the section required is not visible then first it must be shown.
In the previous report where the customers were grouped by country the group footer is not shown, but by first showing more info then the footer section can be shown.
Adding a calculation control
1. Add a text where the calculation needs to be displayed.
2. Type in the calculation in the text box starting with an equals sign.
3. If necessary change the text in the associated label, otherwise delete the label.
This produces the result.
The depth of the gap between one section and the next is controlled by the depth of the section.
The formula does not just have to produce a numerical number. Text and other fields can be concatenated (added together by using the ampersand) to make an expression.
This produces:
No comments:
Post a Comment