Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Running total not working correctly Post Reply Post New Topic
<< Prev Page  of 3 Next >>
Author Message
Nav522
Senior Member
Senior Member


Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 166
Quote Nav522 Replybullet Posted: 12 Oct 2017 at 7:24am
I did changed it to Default values for NULLS but still returns NULLS. So I created another formula If ISnull() then 0 and used that formula to suppress blank.

Thanks a lot
IP IP Logged
Nav522
Senior Member
Senior Member


Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 166
Quote Nav522 Replybullet Posted: 18 Oct 2017 at 7:31am
Hello Dblank - I have a query about this.

The RT that I created works for only few examples

In the RT we have mentioned to Evaluate on change of TRANS ID. It works when the data is like this below

Policy     TRANSID   Amt
JKC74     RC        750
            RC          750
            DU           0
Output comes correctly as : 750

But for some data like here below it is doubling the amounts

Policy     TRANSID   Amt
JKC69    RC        1400
           DU          0
           RC          1400
           DU           0

I need to get only 1400 but since the evaluate is on TRANSID its giving me 2800.

Is there any creative way to handle this situation??
[IMG]smileys/smiley5.gif" align="middle" />

Edited by Nav522 - 18 Oct 2017 at 7:38am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 18 Oct 2017 at 7:48am
In example 2 each row the TransId value was changing. I think it works kind of like a next() or previous().
If you sort on policy and transid it should be fine.
IP IP Logged
Nav522
Senior Member
Senior Member


Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 166
Quote Nav522 Replybullet Posted: 18 Oct 2017 at 7:54am
I didn't get it. Where should I include the next() previous formula? In the reset?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 18 Oct 2017 at 8:16am
Sorry. I mean that in a Running Total for the evaluate section when you use the on change of a field option it acts like the next/previous functions in a formula. It was just a way to explain why it "works" in your first example but not the second. If you change your sort order it changes the way the RT will evaluate.
IP IP Logged
Nav522
Senior Member
Senior Member


Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 166
Quote Nav522 Replybullet Posted: 18 Oct 2017 at 8:52am
Ah got it. So by sorting it should work. Thanks
IP IP Logged
Nav522
Senior Member
Senior Member


Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 166
Quote Nav522 Replybullet Posted: 30 Oct 2017 at 10:41am
Hi Dblank -
Sorry for revisiting this again. I didn't have all the data laid out so still the results are skewed.

Apart from the TRANSID field I do have PCTSPLIT Field that I needed to take into account while doing the Running Total for AMOUNT

Policy   PCTSPLIT   TRANSID      AMT
JKC69       0        RC        0
             99        DU       1400
             99        DU        0
              1        DU        600

With the Evaluate on TRANSID and sort on POLICY,TRANSID its still giving the wrong running total for AMT as $1400.Instead I should show $2000 as correct amount

How to include both the fields in Evaluate for RT?

Is there a formula that you can think of?



Edited by Nav522 - 31 Oct 2017 at 4:05am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 31 Oct 2017 at 4:28am
If you cannot use the PCTSplit as the evaluate on change of field you can likely create a formula field that concatenates PCTSPLIT and TRANSID and then use that for the field for on change of.
IP IP Logged
Nav522
Senior Member
Senior Member


Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 166
Quote Nav522 Replybullet Posted: 31 Oct 2017 at 5:09am
THE PCTSPLIT shows decimals as 100.00 and the TRANSID is a String.

How do I get rid of the decimals and then concatenate?
Round doesn't seem to work.

round(PCTSPLIT)+ TRANSID   gives

100.00DU
100.00RC

Any idea?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 31 Oct 2017 at 5:19am
What data type is the PCTSPLIT field?
You can leave the decimal points in as it is not relevant to the change of the field. Note you don't have to display the field to use it in the RT.
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.