Crystal Reports
Author Message
Crystal Reports

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

Tue, 03 Nov 1998 03:00:00 GMT
Crystal Reports

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

You could group the records on an expression like .resDepth \ 20
(integer division), which would return the following

range   returns
0 to 19 0
20 to 39        1
40 to 59        2
60 to 79        3
80 to 99        4

Or (.resDepth + 1) \ 20 for 1-20, 21-39, etc.

Michel Marinier

Wed, 04 Nov 1998 03:00:00 GMT
Crystal Reports

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...

Thu, 05 Nov 1998 03:00:00 GMT
Crystal Reports

Patrice,

The two gentlemen who have answered this previously are right on the
money. Regarding graphing, beware of one thing: Crystal will not graph
on multiple fields at the same time, only summary sections of the same
field (column of numbers). If you want graphs that will do this, I'm
afraid you'll either have to do a lot of data manipulation to get all
your data into the same column, or use another graphing utility
besides Crystal's. I did tech support for Crystal for a long time. If
you were to come up to me on the street and ask me what Crystal's
weakest feature is, I'd have to tell you graphing for the above
reason. Good Luck.

Eric {*filter*}
Atlanta, GA

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

Thu, 12 Nov 1998 03:00:00 GMT

 Page 1 of 1 [ 4 post ]

Relevant Pages