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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving records to array from details

Status
Not open for further replies.

crystaldev1

Programmer
Nov 6, 2003
232
US
I'm using CR 9 and Sql Server 2005. I would like to save records to an array from details section. Record number would match the array subscript. For instance, {id} in record number #1 would be assigned to x[1], {id} in record #2 would be assigned to x[2], etc.. When I declare, I do not know the number of records array will include so this has to be dynamic. Thanks for any help.
 
I don't think this is possible in Crystal. What outcome are you wanting? There may be some other way to get it.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
YOu have to define the size of the array first, and it can only have up to 1000 elements.

In report header add formula

@declare

global stringvar array IDList:=("", "", "","","","","","",""... etc up to 1000 or as many as you require.


You can then populate in details.

@pop
whileprintingrecords;

global stringvar array IDList;

IDList[recordNo]:={yourIDfield}

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top