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!
  • Students Click Here

*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


Array Troubles Can Any Crystal Gurus help?

Array Troubles Can Any Crystal Gurus help?

Array Troubles Can Any Crystal Gurus help?

I have a list of 1,174 part numbers in an Access table. I need to convert the column of numbers to a row and format them to be used as a filter in Crystal Reports 2008.


"123", "456", "789"

I understand that Crystal has a limit of 1000 items and I have 1,174. I don't understand arrays much at all, I have spent the last 6 hours working on an array formula I found online for breaking an array up into two arrays then combining them in the report footer.


The site has "totext(<field name>,"####")" in the formula for some reason, I took totext and "####" out because it was giving me an error message. "Too many arguments have been given to this function "####".

Here is my formula:

FORMULA for PNs detail row Test


StringVar Array arrcount1;
StringVar Array arrcount2;

NumberVar i;

redim preserve arrcount2[distinctcount({AMT_Part_Numbers.AMT Part Numbers})-1000];
redim preserve arrcount1[1000];


if i<=1000 then arrcount1[i]:=({AMT_Part_Numbers.AMT Part Numbers}) else arrcount2[i]:=({AMT_Part_Numbers.AMT Part Numbers});

It accepts that formula.

When I run the report I get the following error regarding the formula:

"A subscript must be between 1 and the size of the array"
It highlights "else arrcount2[i]:={AMT_Part_Numbers.AMT Part Numbers};"

I cannot figure out how to get past this.

For reference here is the formula I'm using to display the arrays in the footer.

FORMULA for report footer to display PNs Test

StringVar Array arrcount1;
StringVar Array arrcount2;

join(arrcount1[1 to DistinctCount({AMT_Part_Numbers.AMT Part Numbers})],",")+" , "+join(arrcount2[1 to DistinctCount({AMT_Part_Numbers.AMT Part Numbers})],",");

I don't know if I will have any problems with this if I can get beyond the errors in the first formula.


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!

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