Crystal Reports Online Training

Learn Online, Anytime, Anywhere

Step-by-step online tutorials.

15.09 Summary Field Objects

Understanding the Summary Field Classes

The summary field classes are referenced with the SummaryField property of the DataDefinition class.





Figure 15-13. The Summary Field classes.

The SummaryField property is a collection of SummaryFieldDefinition objects. Each object contains all the information about each summary field: the field, the summary operation, etc. Unfortunately, it is missing one key piece of data: the section it is located in. There are no properties to tell you if it is a subtotal or a grand total. This is an important piece of information that you need to know about a field. To see how much information is provided to you, look at Figure 15-14. It is the output of the Mapping application for the SummaryField collection. You can see that there is no way to determine which fields are subtotals and which ones are grand totals.





Figure 15-14. The summary fields mapping output.

While accessing all the summary fields from the DataDefinition class is possible, you aren’t given enough information to make it practical. It is better to reference these fields from within the sections that they are located in.