Do a pair of running totals. Have them count some other field, such as a name or account number. But make the running totals conditional - one on the date being null and the other not.
Note that 'Isnull' tests must always be done first, because Crystal formulas stop when they encounter a null for anything except an 'Isnull' test.
The coverse of Isnull is
not IsNull
Right-click on a field and choose
Insert to get a choice of
Running Total,
Summary and
Grand Total. Or else use the
Field Explorer, the icon that is a grid-like box.
It is also possible to get get totals using a
Formula Field, which can contain a Variable or a Directly Calculated Total.
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.
Grand totals are much like summary totals, but for the whole report rather than groups. Note that summary totals include an option to have a grand total calculated on the same basis.
![[yinyang] [yinyang] [yinyang]](/data/assets/smilies/yinyang.gif)
Madawc Williams (East Anglia, UK)
![[yinyang] [yinyang] [yinyang]](/data/assets/smilies/yinyang.gif)