Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Array Problem with Crystal 7

Status
Not open for further replies.

IanWaterman

Programmer
Jun 26, 2002
3,511
GB
I am modifying a report embedded in another application which is written in 7.

The report creates a picklist and client wanst to see a list of despatch notes at then end of the report so that they can be sure warehouse confirms all and raises invoice properly.

Initially I grouped by despatch and then by pick location, I can then easily produce a list of despatch nos in a string variable. however, client does not like this and wants picklist grouped by Pick location then despatch note, consequently the despatch no could appear multiple times and my simple string variable is not so simple.

At present all I do is evaluate variable in Despatch No group header.

Stringvar DespatchNo = DespatchNo+" "+totext({DespatchNote})

Ideally if I was using Crystal 8 or above I would build an array on the fly, but you can not do this in 7.

Does any one have any code that will allow me to build arrays in 7.

Or

Can any one see a simple solution to my problem without using arrays.

Thank you

Ian

 
Hi Ian,

To build an array in v7, you'll have to hardcode for each component of the array, I'm afraid.

Something like this should work in v7:

StringVar Array YourString := {@YourDespatchString};
NumberVar Components := Count(YourString);

YourString[1] +
If Components > 1 Then ', ' + YourString[2] +
If Components > 2 Then ', ' + YourString[3] +
etc...

Naith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top