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

Loading an array

Status
Not open for further replies.

HowardHammerman

Instructor
Oct 11, 2001
640
US
Is is possible to load an array as Crystal moves through the records in a table? I need to declare a dateVar range array in which each element of the array is a range taken from two fields in the table. There are never more than 10 or 12 records in the group, so I don't have to worry about exceeding CR limits.

Also, how does one initialize a datevar range array to nulls?

Thanks,

Howard Hammerman,
Crystal Training and Crystal Material
On-site and public classes
Low-cost telephone/email support
FREE independent Crystal newsletter
howard@hammerman.com
800-783-2269
 
Here is an example of a formula that loads an array on a record by record basis. You can add your logic as needed:
Code:
dateTimeVar array daterange;

if onfirstrecord then
    ReDim daterange [1]
else
    ReDim Preserve daterange [ubound(daterange)+1];

daterange[ubound(daterange)] := {table.datefield};

~Brian
 
Thanks,

Can you show me this in Crystal syntax?



Howard Hammerman,
Crystal Training and Crystal Material
On-site and public classes
Low-cost telephone/email support
FREE independent Crystal newsletter
howard@hammerman.com
800-783-2269
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top