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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create Array

Status
Not open for further replies.

muhaidib

Programmer
Sep 27, 2005
82
SA
In the main report I created a formule as follows to create a shared array:

WhilePrintingRecords;
shared stringvar Array inv1Array;
inv1Array:={PAYABLETCP.IDINV};
local NumberVar howmany:= count({PAYABLETCP.IDINV});
if howmany > 0 then inv1Array[1] +
if howmany > 1 then ', ' + inv1Array[2] +
if howmany > 2 then ', ' + inv1Array[3] +
if howmany > 3 then ', ' + inv1Array[4] +
if howmany > 4 then ', ' + inv1Array[5];
inv1Array[1];

Last line of the text is meant for displaying the first value in array.

On running the report I get following error message:
"A subscript must be between 1 and the size of the array"

I tried to insert a statement as = "redim inv1Array[3]"

but the same error message appears. It seems "redim" is not accepted.

In the subreport I created a formula with following text to display the array:

whileprintingrecords;
shared Stringvar array inv1Array;
inv1Array[1];

The error still remains.
I am stuck up.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top