Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Running Totals Post Reply Post New Topic
Author Message
Mohan56
Newbie
Newbie


Joined: 24 Apr 2018
Online Status: Offline
Posts: 1
Quote Mohan56 Replybullet Topic: Running Totals
    Posted: 10 May 2018 at 12:51pm
Would you know why my 5YearTotal column displays the total value on the next row, instead of the current?

I have the following formula in my Detail Section;

whileprintingrecords;
Global numbervar RunningSalesTotal5YR;
Global numbervar RunningSalesTotalParmDates;
Global datetimevar StartBillDatePlus5Yrs;


If ({#RunningTotal} > 9999) and ({Bill_Date} <= StartBillDatePlus5Yrs) then RunningSalesTotal5YR := {#RunningTotal};

My results show up as following;

TotalBilled     RunningTotal     5YearTotal
479.60          9,592.00          0.00
719.40          10,311.40        0.00
479.60          10,791.00        10,311,40
119.90          10,910.90        10,791.00
119.90          11,030.80        10,910.90
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 14 May 2018 at 8:12am
I believe that the whileprintingrecords and Running Totals both execute in Pass 2. The RT should execute just before the PrintTime formulas.
Do you have more than one detail section? items in Detail a will run before detail b.
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.