Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: referencing an array variable value in a formula Post Reply Post New Topic
Author Message
shorembo
Newbie
Newbie


Joined: 13 Jul 2010
Online Status: Offline
Posts: 1
Quote shorembo Replybullet Topic: referencing an array variable value in a formula
     Posted: 13 Jul 2010 at 9:43am
I have a situation where I want to populate and array variable in one formula then reference in another formula so I can print it.
 
When I try to do this, I get the following message when running the case:
'subscript must be between 1 and the size of the array'
 
The example is:
 
1st Formula - PopulateArray
 
  Global StringVar Array FootNotes := ['','','','','',''];
  FootNotes[1] = 'yaddi yaddi'
 
2nd Formula - Footnote1
 
  Global StringVar Array FootNotes ;
  FootNotes[1]
 
 
BTW, the 1st formula is on the report above the 2nd formula.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 14 Jul 2010 at 6:04am
you didn't assign the value to the array, you just compared it. Use := for assignment and see if that helps.  I would have thought that it wouldn't have thrown an error as it is initialized to an empty string
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