Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Variable Not Resetting Post Reply Post New Topic
Author Message
rcoxe
Newbie
Newbie


Joined: 19 Apr 2018
Location: United States
Online Status: Offline
Posts: 10
Quote rcoxe Replybullet Topic: Variable Not Resetting
    Posted: 31 May 2018 at 5:41am
I have a report where I am trying to calculate the average of the minimum daily value over a month. My report has 2 groups: #1- Personnel and #2- Day of the Month. Using CR 11.

I am using a shared variable to compute a running total for the month. This works fine for the first person but I cannot get the variable to reset for the next person. I have tried to place it in every possible section but it does not reset.

My first formula, in group 2 footer, calculates the running total for each day:
    WhilePrintingRecords;
    Shared Numbervar MinFirstCallSeconds := MinFirstCallSeconds + {@CallCompletedFirstSeconds};


In the footer of group 1 I have a formula to display the total:
    Shared Numbervar MinFirstCallSeconds; MinFirstCallSeconds;


And my reset formula:
    WhilePrintingRecords;
    Shared Numbervar MinFirstCallSeconds = 0;


No matter where I place the reset formula I get a result of "False" after the first person. What am I doing wrong?

Thank you
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 31 May 2018 at 7:02am
your evaluating for 0 (=), not setting it to 0 (:=)

WhilePrintingRecords;
Shared Numbervar MinFirstCallSeconds := 0;
IP IP Logged
rcoxe
Newbie
Newbie


Joined: 19 Apr 2018
Location: United States
Online Status: Offline
Posts: 10
Quote rcoxe Replybullet Posted: 31 May 2018 at 8:47am
Yes that was it. Thank you.
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.