You could also do it with a pair of arrays and a bit of jiggling.
In the Report Header, initialize the arrays like so:
WhileReadingRecords
Global StringVar Array TotName;
Global StringVar Array MultName;
ReDim TotName[1];
ReDim MultName[1];
TotName will end up holding all the names in the report. MultName will end up holding all the names that appear more than once. Note that if you have a lot of names, you may run into memory issues, and may need to try an alternate approach.
In the Details section, update the arrays like so:
WhileReadingRecords
Global StringVar Array TotName;
Global StringVar Array MultName;
IF {MyReport.MyName} in TotName THEN
(IF Not({MyReport.MyName} in MultName) THEN
(MultName[UBound(MultName)] = {MyReport.MyName};
ReDim Preserve MultName[UBound(MultName)+1];))
ELSE
(TotName[UBound(TotName)] = {MyReport.MyName};
ReDim Preserve TotName[UBound(TotName)+1];)
This will look at the name of the record. If it is already in the list of names, then it will look in the list of names listed multiple times. If it is in both, it ignores it. If it is in neither, it adds it to the total list. If it is in the total list, but not the multiple list, it adds it to the multiple list. Once it adds a name to a list, it also increases the size of that list by 1 to account for the next record to come in.
In the Report Footer, your "Only Once" formula will look like:
WhileReadingRecords
Global StringVar Array TotName;
Global StringVar Array MultName;
Count(TotName) - Count(MultName);
Your "More than Once" formula will look like:
WhileReadingRecords
Global StringVar Array TotName;
Global StringVar Array MultName;
Count(MultName);
Does that make sense?