cancel
Showing results for 
Search instead for 
Did you mean: 

Error while exporting Crystal Report

GSG
Participant
0 Kudos

Hello Sap Community,

When trying to export or go to the end of the last page, I am getting the SAP Crystal Reports error :

"An Array's dimension must be an integer between 1 and 1000"

After clicking "OK" an existing following formula pops up:

WhilePrintingRecords;

stringvar array plant;

redim preserve plant[GroupNumber];

plant[GroupNumber] := GroupName ({Command.EVSTRNAME});

Please advise how to address the error. Would appreciate. Thanks

View Entire Topic
DellSC
Active Contributor
0 Kudos

I would tweak your formula to initialize the array to have at least one entry. This is how I've done it in the past using Crystal syntax:

WhilePrintingRecords;
stringvar array plant;

If OnFirstRecord then
  plant := makeArray(GroupNumber); //I don't remember whether you need the ; here...
else 
  redim preserve plant[GroupNumber];

plant[GroupNumber] := GroupName ({Command.EVSTRNAME});
''

The final empty string sets this up so that the formula doesn't display anything if you need to put it in a section that has other data - you don't need it if you want to display the name.

-Dell