Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Declaring an Array

Status
Not open for further replies.

Dond12

Technical User
May 3, 2001
57
US
I have been trying to create a variable that takes the form of an array. I followed the instructions in Seagate's technical paper on arrays and wrote the following in the formula definition:

numbervar array myarray ;
whileprintingrecords ;
myarray := [0,0,0,0] ;

(etc.)

But when I try to save the formula, I get an error message informing me that an array cannot be the result of a formula.

Can anyone tell me what I am doing wrong?
 
Dond12,

It appears that you want to use the contents of the array in other formula in the report. The formula you are creating that contains the array will need to output a single value and not multiple values.

You can bybass this error by simply placing a 0 (zero) or " " as the last statement in the formula. This will provide a value for the formula to return.

Thomas House
Data Management Group
Transforming Data into Information
 
Thank you. Actually, I stumbled across this technique (putting a "0" as the last statement) purely by accident. Thanks for confirming that this is a legitimate thing to do!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top