cancel
Showing results for 
Search instead for 
Did you mean: 

Edit a group sum

Former Member
0 Kudos

I have a field that is a sum, that is currently in the value of feet and I need in to be in miles. Can I do a calculation inside that field to dived by 5,280 and show the value as miles.

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Charles,

Create a formula with this code and place this on the group footer:

Sum({field_to_sum}, {field_used_as_group}) / 5280

-Abhilash

Former Member
0 Kudos

I have attached two screen shots. I may not be explaining correctly. The code i entered gave me an error. The grouping is the column named Total Mileage, and I need that to show as "MILES".  Also, I would like for the total for those groupings to show as a total  underneath, as a footer, for the total "MILES" of road surface.

DellSC
Active Contributor
0 Kudos

Use the formula from Abhilash like this:

Sum({ACF.Shape...}, {Road Surface Type Field})/5280

The "Group" field is the field that is being grouped on for the section where you're placing the sum.

-Dell

Former Member
0 Kudos


Is  the Sum of ACF.Shape in   feet or Miles ??

  Assuming it is in feet  then you would divide by 5280 as Dell and Abhilash have said,   but if you already have miles,  then what I think is your issue is that you are trying to use the sum Wizard to generate the total of  field that is already a sum.......   and Crystal won't let you do that.

You can only do that from a field at the Detail level   ( Which is not currently showing on your report as you show in your screen shot )

....    so add it to the report.  ( and suppress the detail section so it doesn't show  )  

add a new group   ( Grand total  )  

That group goes between the Group 1  ( county? )   and the old group 2 .

( when you do that crystal  will re-number the groups and the new group will be 2  and the group for the surface type will become 3 )

and then do a group sum for that group ( new group 2)  and  place that in the group footer section    (  as a general practice all sums should go in the footers not the headers  ....  unless you have some special reason) 

Place the new sum in the  report right below the other sum.

Does that work better?? 

Ted

Former Member
0 Kudos

I think this will fix my issue. The main thing I was having a problem with was creating the formula. I finally figured out how to properly create the formula in Formula Editor by creating a new Formula Name. It worked then, Plus the information above will me greatly.

I appreciate all of your help and your patience. I have only had the Crystal reports for about 3 weeks now and I am trying to train myself. It is a great product and will be very beneficial to me when I learn how to use it.

Thanks again.

Charles

Answers (0)