×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# Problem with Printing Arrays

## Problem with Printing Arrays

(OP)
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

### RE: Problem with Printing Arrays

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
http://www.chase-international.com
Accredited Crystal Decisions Enterprise Partner

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Close Box

# Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!