cancel
Showing results for 
Search instead for 
Did you mean: 

an array's dimension must be an integer between 1 and 1000

former_member603482
Discoverer
0 Kudos

Does anyone has any clue about the above error i get when I've tried to create sub report in crystal report?

The formula is:

Shared Stringvar array store;

store:= store + {table.A};

1

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member603482
Discoverer
0 Kudos

dell.stinnett-christy Thanks for your reply.I have tried your above code, but I was getting the same error I think was to do with my database size. Finally I've managed to solve the problem by writing a query in SQL, and then add it into Crystal Report and now is working.

DellSC
Active Contributor
0 Kudos

You can't just add a value to an array like that. I'm going to assume that you initialize the array in the main report prior to using it in the subreport. In order to work with this in the subreport, the array has to have at least one value, so what I've done in the past is initialize it with a default value - in this case I would use an empty string like this:

Shared Stringvar array store := [""];

To add a value to an array, you have to do this (Crystal syntax):

Shared Stringvar array store;
Numbervar size = length(store);
if size = 1 and store[1] = "" then 
  store[1] := {table.A}
else (
  size := size + 1;
  Redim Preserve store [size];
  store[size] := {table.A}
);

-Dell