Non-commutative summary field on several grouping levels of a Crystal XI report.

I have multiple formulas that need to be repeated on all grouping levels of my report. i.e.

SUM{OtherNumber}, {GroupField1}) / SUM({RowTotal}, {GroupField1})
SUM{OtherNumber}, {GroupField2}) / SUM({RowTotal}, {GroupField2})
SUM{OtherNumber}, {GroupField3}) / SUM({RowTotal}, {GroupField3})

The formulas are non-commutative, so in the past I've a separate formula field for each groupng level.  this is a maintenance nightmare when I have 5 grouping levels, and 4 different fourmulas.

When I insert a simple summary field to a report, I can simply copy it to the other group footer.header and it adjust to that grouping level as appropriate. Is there a way to replicate this with a custom summarization?..Something like have one formula where the group parameter can determine the grouping of the section the object is on and mimic that behavior?  That way I would only have to create one formula field for each calcualtion and place it on the various headers.

SUM{OtherNumber}, CurentGroupField()) / SUM({RowTotal}, CurentGroupField())
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Depending on what you are doing, i have done this with Weighted Average with. This can not work properly if you have nulls or a lot of zeros, but it has been great for me with things like percents and averages like what you describe.

I believe what I did is the following (don't have good sample at my current gig to play with, so this is from memory).

A detail field would contain your numerator / denominator calculation. Drop it on the report.
Right Click on that field, Insert summary, and choose Weighted Average With.
This will open up another drop down box for you to select a field.
Choose your denominator field.

It might work for your calculations perfectly, but definitely test it first with a side by side comparison.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
telcor739Author Commented:
thanks...that got the number of functions back to manageable levels.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.