Dear JTStittmatter,
You continue to confuse me
> 30 and between 30 and 100 and < 100 **glop** all over each other and really are not good for devising logic ... it seems that maybe the > and < symbols are confused in places ...
If you meant: if there are 30 or less, print all and if there are between 31 and 100, then print 25% and if there are greater then 100 records then print 10% of the records, then the following should do....
Code:
numbervar cnt :=
(Select count({Incident.Incident #})
case 0 to 30 : 1 //always prints
case 31 to 100 : 4 //25%
default : 10 //10%
))
;
remainder(recordnumber,cnt) <> 0
Hope that helps,
p.s. In my formula above, since I am using CR 8.5 there are two parens just before the ";", I know that the Crystal bug that required this was fixed in CR10, but I do not know if the bug was fixed in CR 9 as I don't have that version. If you receive an error on the extra paren then just delete one close paren.
The open and close (& in CR8.5 the double close) are required because I have a case statement in the statement setting the value for the variable and otherwise it does not think that the statement separator ";" is valid.
ro
Rosemary Lieberman
rosemary-at-microflo.com,
Microflo provides expert consulting on MagicTSD and Crystal Reports.
You will get answers more quickly if you read this before posting: faq149-3762