Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Summarize a formula field by group Post Reply Post New Topic
Author Message
SallyB
Newbie
Newbie
Avatar

Joined: 19 Mar 2019
Location: United States
Online Status: Offline
Posts: 2
Quote SallyB Replybullet Topic: Summarize a formula field by group
    Posted: 02 Apr 2019 at 10:48am
In my report I have 2 groups. Group 1 is the person and group 2 is the charge code.

I want to calculate the workload value for each charge code for each person and the total workload value for that person.

I have the following formula: The first converts a string to a number
RVU Number =
if IsNumeric ({WorkloadDefinitionTable.Units})
then ToNumber({WorkloadDefinitionTable.Units}))

The second one I use to calculate a workload value per chargecode
Workload Value =
{@RVU Number}*DistinctCount ({SpecimenChargeSlipTable.ObjectID}, {SpecimenChargeSlipTable.Code})

Now I want to add all the workload values for the charge codes for each person into a total workload per person. Crystal does not allow me to summarize the workload value formula. I tried
Sum ({@Workload Value},{@Grosser} )
but get an error that the @workload value cannot be summarized.

How can I accomplish what I want to do? Thank you!
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 19 Apr 2019 at 3:19am
Unfortunately, you cannot summarize a value that comes from a formula that contains a summary function. However, you might be able to use a running total to get this - use the second formula as the field to summarize, have the summary calculate for each {SpecimenChargeSlipTable.Code}, and reset on change of the person group.

-Dell
IP IP Logged
SallyB
Newbie
Newbie
Avatar

Joined: 19 Mar 2019
Location: United States
Online Status: Offline
Posts: 2
Quote SallyB Replybullet Posted: 22 Apr 2019 at 7:19am
Thank you for your response. I tried to do as you suggested but unfortunately the second formula is not in the list of available fields to summarize in a running total. This seems crazy. There should be a way to do what I want but I sure cannot find it. Thanks again for your help.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.