Formulas in Crystal do not allow you to insert NULLs so this type of count always has the flaw of a possible empty string that ends up adding 1 to your distinctcount. You have to use either variable formulas or a Running Total (RT).
I prefer Running Totals. Note that neither work in headers.
The RT version.
Create a new RT
Name=whatever
Field to summarize={StringField}
type = DistinctCount
Evaluate=use a formula...use your criteria here...{NumberField} like "??02"
Reset = Never if you want grand total or on a group if youa re lookikng for a group level total
place on report footer or group footer for totals and on detail section to see incrimental (row) changes.
Edited by DBlank - 20 Jan 2011 at 4:08am