• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 534
  • Last Modified:

Arrays in Crystal 10 - exceeding 1000 elements

Hi All:

I have a form with an Array that stores a Site Ledgend for an Invoice - some of the customers have more than 1000 sites - is there any workaround for this?  The formula is producing an error and the form will not print.

Thank you!


________________________
First Formula:

whileprintingrecords;

Global Stringvar Array Site;
ReDim Site[1];

""
_______________________________________________
Second Formula:  (this one is causing the error when the customer has more than 1000 sites)

whileprintingrecords;

Global StringVar Array Site;
Global StringVar strResult;
Global NumberVar arrayUpBound;

if {@xSiteDetails} <> "" then
(
    arrayUpBound := UBound(Site) + 1;
    ReDim Preserve Site[arrayUpBound];
    Site [arrayUpBound] := {@xSiteDetails};
    strResult := "1" ;
)

else

(
    strResult := "0" ;
);
strResult

_____________________

xSiteDetail formula:

left({CL_23CRWInvoiceDetail.ForeignSiteCode} + space(10),10) & "  "&
left({CL_23CRWInvoiceDetail.ForeignSiteDescription} + space(25),25) & "   "&
left({CL_23CRWInvoiceDetail.ForeignSiteAddress1} + space(30),30) & "     "&
left({CL_23CRWInvoiceDetail.ForeignSiteCity} + space(20),20) & "     " &
{CL_23CRWInvoiceDetail.ForeignSiteState}

__________________________

Third Formula:  (This one is used to display the Sites legend)

whileprintingrecords;

Global StringVar Array Site;
Join(Site,chr(10))

_____________________________
0
Erin Leale
Asked:
Erin Leale
3 Solutions
 
peter57rCommented:
I'm afraid there is no good news.
There is no setting that you can adjust.

If you can possibly split the data so that you could use a subform for part of the report , that could be the one less difficult option.
Otherwise you into a major development job  to see if you can use multiple arrays to hold the values and process them sensibly.
0
 
mlmccCommented:
I agree.  I looked but I don't see anything in the registry that controls that.  There are other limits that can be overidden or changed through the registry

mlmcc
0
 
Kurt ReinhardtSr. Business Intelligence Consultant/ArchitectCommented:
Since the result of the array is to simply display the legend, could you possibly use a subreport to pull in the list of values to be displayed?

~Kurt
0
 
Erin LealeConsultant/ControllerAuthor Commented:
Thank you!
0
 
Erin LealeConsultant/ControllerAuthor Commented:
I can't use a sub-report for 2 reasons on this form - one is performance and the other is custom programming to email the form.  

Thank you for your help!  Back to the Programmers.

E.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now