Define the invoice as a group of items. Count the number of details. Then have nine blank group footer sections, each of which is suppressed, or not suppressed, depending on the number of details for that invoice.
ight-click on a section and choose
Section Expert. Then choose the formula icon (x+2 and a pencil) for suppression. Enter a formula, which could be testing a summary count on some field in the detail.
To get totals, right-click on a field and choose
Insert to get a choice of
Running Total or
Summary. Or else use the
Field Explorer, the icon that is a grid-like box, to add running totals.
Running totals allow you to do clever things with grouping and formulas. They also accumulate for each line, hence the name. The disadvantage is that they are working out at the same time as the Crystal report formats the line. You cannot test for their values until after the details have been printed. You can show them in the group footer but not the group header, where they will be zero if you are resetting them for each group.
Summary totals are cruder, but are based directly on the data. This means that they can be shown in the header. They can also be used to sort groups, or to suppress them. Suppress a group if it has less than three members, say. They default to 'Grand Total', but also can be for a group.
![[yinyang] [yinyang] [yinyang]](/data/assets/smilies/yinyang.gif)
Madawc Williams (East Anglia, UK)
![[yinyang] [yinyang] [yinyang]](/data/assets/smilies/yinyang.gif)