Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Running Total Fields - subtract? Post Reply Post New Topic
Author Message
Stircrazy08
Newbie
Newbie
Avatar

Joined: 12 Nov 2014
Location: United States
Online Status: Offline
Posts: 34
Quote Stircrazy08 Replybullet Topic: Running Total Fields - subtract?
     Posted: 13 Jan 2015 at 5:09am
hi,
I am using a invoice detail table to find the difference between Nov 1-30, 2014 and Nov 1-30, 2013., so i create a few group formulas, depending on which range, first one curmonth, second PriorMonth, and then i created another formula to add the qty to CurMoQty if CurMO, and likewise for priorMonth, then i created a running total field to sum CurMoQty, and reset on item, as it is grouped by item. and have the running total fields in the group footer.
is there a way to subtract the two running total fields, CurMoQty - PriorMoQty ??
Peter F
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Jan 2015 at 6:06am
create a formula field as such
#CurMoQty - #PriorMoQty
must be placed in the footer where the running totals display the correct values
or create a formula field to set the 2013 values as negative and the 2014 values as positive and sum that
IP IP Logged
Stircrazy08
Newbie
Newbie
Avatar

Joined: 12 Nov 2014
Location: United States
Online Status: Offline
Posts: 34
Quote Stircrazy08 Replybullet Posted: 13 Jan 2015 at 6:29am
DB,

I created a formula field called PlusMinus, and i added the expression as.

#CurrentTotalMON - #PriorTotalMON

which are the actual RTfields that were created to summarize the qtys.
i get a warning that states: This date time literal was not understood.

do i have the wrong syntax? i am sorry, very new to CRXI so big learning curve for me.

appreciate your responses!
Peter F
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Jan 2015 at 6:42am
these are report fields that require the {} to identify them as such
 
{#CurrentTotalMON}-{#PriorTotalMON}
IP IP Logged
Stircrazy08
Newbie
Newbie
Avatar

Joined: 12 Nov 2014
Location: United States
Online Status: Offline
Posts: 34
Quote Stircrazy08 Replybullet Posted: 13 Jan 2015 at 7:37am
DB,
that worked perfectly! I'm making it rain for you! :)

Peter F
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