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

Problem with Printing Arrays

Status
Not open for further replies.

EdMason

Programmer
Jan 19, 2001
13
US
Array has 200 elements and each element is 30 characters. Array is accumulated in Detail. Printing is in Group Footer and Report Footer. There may be one array element used or 200 used. Printing is via a formula where all the elements defined as shown below:

WhilePrintingRecords;
Global StringVar Array ProductDesc;
Global NumberVar T2;
Local StringVar Array P;
Local NumberVar X;
redim P[200];

For X := 1 To T2 Do
(P[X] := ProductDesc[X] + CHR(13));

P[1]+P[2]+P[3]+P[4]+P[5]+P[6]+P[7]+P[8].......+P[200];

Problem: I get the error stating the the String has exceeded the max of 254 in length. I know that I can "break-down" the above into seperate formulas, but that sure is cumbersome. Any suggestions???
TIA
Ed Mason
 
Ed: As a formula can only have 1 result then I regret you may have to consider breaking your formula up into 254 sized chunks. Before you do that you might like to try (haven't done it myself so can't guarantee a result)the following:

Create a number of shared stringvars within the formula and assign each a part of the array of results so that you end up with multiple stringvars each under 254 chars. Then create a sequence of matching shared stringvar formulas just as you would if using to transfer result from a sub to a main report i.e. declaration only and see if you can 'break up' your string easily this way. Could be worth a try as the alternative is a pain! I know I've had to do that many times:) David C. Monks
david.monks@chase-international.com
Accredited Crystal Decisions Enterprise Partner
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top