Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Sum of Running total(s) Post Reply Post New Topic
<< Prev Page  of 3 Next >>
Author Message
nabilino
Newbie
Newbie
Avatar

Joined: 02 Nov 2009
Location: United States
Online Status: Offline
Posts: 25
Quote nabilino Replybullet Posted: 19 Nov 2009 at 9:50am
I have running totals summing up Deduction codes per employee for every month. Now, I want to display the YTD total somwhere to capture the ded code total YTD.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 19 Nov 2009 at 11:15am

So instead of using RTs can you group on Employee then group on Datefield set to per month then use

SUM(dedcode field,group2field) to get your month totals per worker
SUM(dedcode field,worker) to get your worker totals.
 
IP IP Logged
nabilino
Newbie
Newbie
Avatar

Joined: 02 Nov 2009
Location: United States
Online Status: Offline
Posts: 25
Quote nabilino Replybullet Posted: 19 Nov 2009 at 12:43pm
Good suggestion
I tried this formula:
sum({Command_1.DED-AMT},{Command_1.CHECK-DATE})
 
but I get there must be a group that matchs this field. Notice I created a group for both.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 19 Nov 2009 at 12:59pm
In your report design you will need to have your group1 set up on the employee then group 2 set up on Date set to per month.
Your SUM has to take into acount the per month portion :
sum({Command_1.DED-AMT},{Command_1.CHECK-DATE}, "monthly")
IP IP Logged
nabilino
Newbie
Newbie
Avatar

Joined: 02 Nov 2009
Location: United States
Online Status: Offline
Posts: 25
Quote nabilino Replybullet Posted: 19 Nov 2009 at 1:26pm

Well, I have to distinguish the Monthly total by DedCode as well. So that's why I think the running total would work better, that way I can set conditions to Sum the DED-AMT only when Month ({Command.CHECK-DATE})=4 for April, and Reset the total once the EMP group changes.

The
sum({Command_1.DED-AMT},{Command_1.CHECK-DATE}, "monthly") formula will give me the monthly total for ALL DED-CODES
 
so I'm back to the drawing board.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 19 Nov 2009 at 1:28pm
just add another group (3rd one) on DEDCODE and do a sum there.
IP IP Logged
nabilino
Newbie
Newbie
Avatar

Joined: 02 Nov 2009
Location: United States
Online Status: Offline
Posts: 25
Quote nabilino Replybullet Posted: 19 Nov 2009 at 1:48pm
Ok that right there: Sum ({Command.DED-AMT},{Command.DED-CODE}) gave me the YTD Totals for my Ded Codes Amounts.
IP IP Logged
nabilino
Newbie
Newbie
Avatar

Joined: 02 Nov 2009
Location: United States
Online Status: Offline
Posts: 25
Quote nabilino Replybullet Posted: 19 Nov 2009 at 2:53pm
Originally posted by nabilino

Ok that right there: Sum ({Command.DED-AMT},{Command.DED-CODE}) gave me the YTD Totals for my Ded Codes Amounts.
 
Sorry I was wrong! This forumla calcuates one month's amounts only, not YTD.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 19 Nov 2009 at 3:01pm

Perhaps you grab and move group 3 up to group level 1 and this would addres ti but i am not sure...

Leaving your existing report aside, can you post a little sample row level data from your source and then an example of what you want the report to look like with all of the calculations?
I am having trouble visualizing the overall process you want to get to...


Edited by DBlank - 19 Nov 2009 at 3:02pm
IP IP Logged
nabilino
Newbie
Newbie
Avatar

Joined: 02 Nov 2009
Location: United States
Online Status: Offline
Posts: 25
Quote nabilino Replybullet Posted: 19 Nov 2009 at 3:33pm
DBlank- I found out somthing interesting..If I'm trying to sum 2 running totals that contain data using {RT1}+{RT2} it works, but if one or more are null, the Sum becomes null as well...wierd
What I would like to do is something like this:
 
DedCode Amt                    Jan        Feb       Mar      ... YTD
PPO          50                     100       150       50        ... 300
PPO1        10                      10        20         10        ...  40
 
I have running totals calculating the monthly totals. This is how:
January Total
Field to Sum: Ded-Amt
Evaluate: Formula: Month ({Command.CHECK-DATE})=1
Reset: Group:DedCode
 
The part where I'm stuck is the YTD one.
 
 
 
 


Edited by nabilino - 19 Nov 2009 at 3:34pm
IP IP Logged
<< Prev Page  of 3 Next >>
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.