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

Join Problem in 8.5

Status
Not open for further replies.

steventr

Programmer
Jan 28, 2003
7
US
The following code generates the error:

"A string array is required here"

and when I press OK, the cursor goes to the spot marked *, on the join line.

Thanks for your help.

steven

// {@printArray}
stringvar array GrossArr;
numbervar y:=1;

while y < 10 do
(
join(*GrossArr[y] , chr(13));
y := y + 1;
) ;
 
GrossArr[y] is not a string array, it is a value within the array. If you want to output the array with carriage returns all you need is:

join(GrossArr , chr(13))

Lisa
 
I tried the solution and get a message:
&quot;A string can be at most 254 characters long&quot;

The array is a full 1000 elements and I am trying to print each element on a separate line, for only those rows that have been populated with data.

Thanks for your continuing help.

steven
 
CR 8.5 has the limit of 254 chars per output by a formula, and a 1000 element array sounds suspicious, there's generally a better way to do things.

Perhaps if you supply sample data, formulas used, and expected output, someone can help.

The alternative would be to have numerous formulas, each displaying a 254 char or less portion of the 1000 element array.

-k
 
Does each GrossArr[y] relate to a different record?

If not then each record has 1000 or so GrossArr[y]? How do you fill the array? Can you just display the data source and not put it into an array? Perhaps as a subreport?

Lisa
 
I am using a 4 digit department code for which I will be accumulating dollar values. I was planning on using arrays A0, A1,..,A9 to hold each thousands group.

I need to have 3 different sets of this for 3 different computations, as 8.5 allows only single value arrays. B & C would be used for other 2 arrays.

B[x] and C[x] can have values only if A[x] does.

The departments can, and usually do, change with each bi-weekly payroll.

I am able to fill the elements of the arrays, but am unable to print the array population (I really don't want 9,999 lines printed with each run, but just to print those A elements that have been populated).

Thank you for your continued help.

steven
 
Ah so you just want one output for a line. I am assuming you know what the indice is.. so:

GrossArr[y] will give you your output.. not sure where the chr(13) is..

If you could give us a little better idea of what the data structure is and what you want the output to look like it would help. I think that there must be an easier way without loading a huge array.

Lisa

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top