Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Lastrecord In group total help Post Reply Post New Topic
Author Message
tdog
Newbie
Newbie


Joined: 03 Mar 2009
Online Status: Offline
Posts: 7
Quote tdog Replybullet Topic: Lastrecord In group total help
     Posted: 03 Mar 2009 at 1:12pm
I have data that looks like this:

Name Group
John SMith           Hours
     Billed hours      9
     Non Bill          8
     Total Hours      17
Jane Doe
     Billed hours      9
     Non Bill          9
     Total Hours      18
---------------------------------------
Name group total    Sum(hours)

I only wish group total sum(hours) to total the total hours values and not the other values as it isnt accurate. This is within a single group. Thanks !
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 03 Mar 2009 at 1:53pm
YOu can either do a running total and conditionaly sum the field by excluding the total hours
or you can do a formula field to convert the hours and esclude the total hours amount and then sum on on the formula field.
if you need help with these please explain how the data is in the table, example are the hours in the same field are the names in the same field or are all 3 on the same row using different columns?
IP IP Logged
tdog
Newbie
Newbie


Joined: 03 Mar 2009
Online Status: Offline
Posts: 7
Quote tdog Replybullet Posted: 03 Mar 2009 at 2:03pm
Thanks for the quick response. The data is from a single table that was built with a stored procedure. The rows from columns 3,4 ,5 from the table look like this below. I need to know how to do what you described as Im a new one to what you described. Thanks !!

Abrams, Sara A.     Billable     107.8000
Abrams, Sara A.     Non-Billable     13.1000
Abrams, Sara A.     Total     120.9000
Adams, Michelle G.     Billable     124.9000
Adams, Michelle G.     Non-Billable     35.2000
Adams, Michelle G.     Total     160.1000
Adema, Rene M.     Billable     105.1000
Adema, Rene M.     Non-Billable     25.5000
Adema, Rene M.     Total     130.6000

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 03 Mar 2009 at 2:16pm
Running total option:
Create a Running Total called "Billable and non-billable" (or whatever you want) by a right click on running total and select new.
Field to Summarize: column 5
type of summary: sum
evaluate: use a formula (mark that and clcik on the X-2 button) foumla is
{table.column4} <>"Total"
Reset: on change of group1 (assuming that is where your column 3 name is grouped).
Place the field in group FOOTER 1 (running totals only work in footers not headers)
 
or use a Formula option:
create a formula by right click on formula field and name it "Hours to Sum" (or whatever you want).
in the formula put:
{table.column4} ="Total" then 0 else {table.column5}
You can place this formula on your detail record to see if it is correctly inserting zeros or the hours where you want it to.
Create a Summary function by click on the Insert SUmmary button
Field to Summarize: x-1 Hours to Sum (will show up as {@Hours to Sum} in a formual)
Calculate this Summary as a SUM
Summary location at group 1.
This can be placed in group footer1 or group header1.
 
IP IP Logged
tdog
Newbie
Newbie


Joined: 03 Mar 2009
Online Status: Offline
Posts: 7
Quote tdog Replybullet Posted: 03 Mar 2009 at 2:24pm

Perfect !
A thousand thank yous
ET



IP IP Logged
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