C [Discard all others.!

• Put all others together, with the name: ¡Others

OK i Cancel

( Leave in their own groups.

Figure 2-10

Although specified grouping is very useful for reordering records, it can be monotonous if you have to use it continually to create the same specified groups in multiple reports. The best practice for specified grouping is to use it only when necessary. If you find you are creating the same groups over and over again, you may want to consider putting this logic into a stored procedure or creating another lookup table in your database that will determine how your grouping is broken up.

For this example, we are not going to use specified grouping, so with your group set as Customer.Country, Customer.Region, and Customer.City in ascending order, the next step is to insert the summaries you want to see within your report.

Working with Simple Summaries

Click the Total tab in the Standard Expert window to add summary information to the report. Summary fields are calculated fields within a Crystal report that do not require a formula to be written. Encapsulating the most popular requests for calculations, like sums and averages, summary fields can be used to rapidly develop reports without a lot of repetitive coding.

To insert a summary field, you will need to select a database field (in this case, Customer.Last Year's Sales) and then choose a summary type from the drop-down list shown in Figure 2-11. We have chosen sum and have also checked the Add Grand Totals box at the bottom of the dialog.

Sranflar« Report Expert

Data Fields uioup Total 10pN Chart | Select | Style

[Optional] Add summary information to the report

For each group you can choose one or more fields to summarise.

Customer. Country Customer.Regiori CustomerCity

Available Fields:: Summarised Fields:

Customer. Country Customer.Regiori CustomerCity

Available Fields:: Summarised Fields:

fi" Add i rand Totals

Blank Report


. « Back |



Was this article helpful?

0 0

Post a comment