Quote:
> Hi,
> I am building a report using Crystal Reports 4.5 and I have a
> problem. I hope one of you can solve it. Here it goes:
> I am accessing an access database in which there is a table named RESULT,
> there is a field in that table named resDepth.
> I would like to divide RESULT.resDepth into 6 ranges:
> 1) 0
> 2) 0 to 20
> 3) 20 to 40
> 4) 40 to 60
> 5) 60 to 80
> 6) 80 to 100
> I would then like to plot a pie chart that would contain those 6 ranges and
> the slice would represent the amount of records in each range.
> Is there any way to do this or something close to it?
> Thanks a lot,
> Patrice LaRoche
Make 6 formula fields from the Insert menu like
range20to40: IF {Result.resDepth} > 20 AND {Result.resDepth} <= 40 THEN 1 ELSE 0
range40to60: IF {Result.resDepth} > 40 AND {Result.resDepth} <= 60 THEN 1 ELSE 0
etc, etc
Put these fields in the DETAILS section and add them up...
This works quite well and You do not have to rely on the division above...
If You at a later point decide to change Your ranges then You only have to change to IF
statement...