Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • 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.

Students Click Here

Problem with Printing Arrays

Problem with Printing Arrays

Problem with Printing Arrays

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:

  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));

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???
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
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.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

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:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close