Simulate the Mail Merge Feature for Summary Fields
- 2 min to read
Online Example: How to simulate the mail merge feature for summary fields
When shaping report data, you may require summary fields to display information from a data source in addition to the summary result, allowing you to simulate the mail merge feature. This tutorial describes how to simulate the mail merge feature for the summary fields at runtime.
Group the report's data by the CategoryID data field, for instance, using the Group and Sort panel. Enable the Show Footer check box to add a GroupFooter band for displaying a summary at the bottom of each group.
- Drop the ProductName field from the Field List onto the created band.
Bind the label's XRControl.Tag property to the CategoryID data field.
Handle this label's XRLabel.SummaryCalculated event.
Paste the following code to the event handler.
The mail-merge report is now ready. Run the Print Preview form and view the result.