Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Shared Array Unexpectedly Cleared? Post Reply Post New Topic
Author Message
vfh-bw
Newbie
Newbie


Joined: 14 Dec 2012
Online Status: Offline
Posts: 6
Quote vfh-bw Replybullet Topic: Shared Array Unexpectedly Cleared?
     Posted: 16 Jan 2013 at 4:24am
I have a shared numbervar array that I'm using to store a custom sum in.  It had been working fine, but I just noticed that it's not anymore!

Here's how it works:
1. report header: initialize shared numbervar array (this includes setting the size, which is fixed)
2. detail section: calculate a number in a formula, which may or may not be used
3. detail section: a formula adds (or not) an amount from the formula in step 2 to the current value of an element in the array

The problem: the shared array seems to be cleared before each detail section.  I've come to this conclusion by showing the progression within the detail section with 3 consecutive formulas (I've made them consecutive with the EvaluateAfter function):
1. display the value of the element in the shared array (this is always 0)
2. carry out the formula in step 3 above (this always amounts to whatever the formula in step 2 above shows, since the array element is starting as 0)
3. display the value of the element in the shared array (this is always the same as in the previous step)

I've looked through my code over and over, and can't find anything that would be clearing it.  What could be causing this unexpected behavior?
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