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

Arrays in Crystal Question

Status
Not open for further replies.

arachnoid

Programmer
Jun 14, 2002
108
US
First off, I am attempting to compare Fiscal Work days from the current year to the corresponding day/period of the previous year. I am having a difficult time generating the data grouped appropiately on one row with the seperate dates.

I thought that an array could possibly be the answer to my problem. Could anyone please explain how to develop and use an array in Crystal?

Any info will be greatly appreciated.
 
Try grouping on (replace orders.order_date with your date):

stringvar MyMonth;
stringvar MyDay;
if len(totext(month({Orders.Order Date}),0)) = 2 then
totext(month({Orders.Order Date}),0)
else
MyMonth :="0"+totext(month({Orders.Order Date}),0);

if len(totext(day({Orders.Order Date}),0)) = 2 then
totext(day({Orders.Order Date}),0)
else
MyDay := "0"+totext(day({Orders.Order Date}),0);

MyMonth+MyDay

Then you can use the years (even subgrouped by year) to determine differences.

-k kai@informeddatadecisions.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top