result of a formula can not be an array
CR8.5
- record set comes in with layout part, trandate(mmddyyyy), qty
- several records per part per month
- for each part need report to show monthly columns across top (jan, feb, mar, ... total) and a total row below
my first leap into arrays in crystal, and they should be as simple as they are everywhere else. maybe i'm braindead, but shouldn't this concept work without getting a msg that a formula in header can not result in an array?
-------------------------
in header there is a formula to declare array, I tried a simple declare with a redim as well.
-------------------------
@var_init
numbervar array monthly_vol := [0,0,0,0,0,0,0,0,0,0,0,0]
-------------------------
in detail there is a formula to add detail to the proper row of the array
-------------------------
@var_evaluate
numbervar array monthly_vol ;
monthly_vol [month({transdate})] = monthly_vol [month({transsdate})] + {qty}
-------------------------
in group footer, 13 individual display variables, jan, feb, ... total
-------------------------
@jan_qty
numbervar array monthly_vol [1]
@feb_qty
numbervar array monthly_vol [2]
...
@tot_qty
numbervar array monthly_vol ;
sum(monthly_vol [1] to [12]
--------------------
then was going to clear the array for the next part number.
CR8.5
- record set comes in with layout part, trandate(mmddyyyy), qty
- several records per part per month
- for each part need report to show monthly columns across top (jan, feb, mar, ... total) and a total row below
my first leap into arrays in crystal, and they should be as simple as they are everywhere else. maybe i'm braindead, but shouldn't this concept work without getting a msg that a formula in header can not result in an array?
-------------------------
in header there is a formula to declare array, I tried a simple declare with a redim as well.
-------------------------
@var_init
numbervar array monthly_vol := [0,0,0,0,0,0,0,0,0,0,0,0]
-------------------------
in detail there is a formula to add detail to the proper row of the array
-------------------------
@var_evaluate
numbervar array monthly_vol ;
monthly_vol [month({transdate})] = monthly_vol [month({transsdate})] + {qty}
-------------------------
in group footer, 13 individual display variables, jan, feb, ... total
-------------------------
@jan_qty
numbervar array monthly_vol [1]
@feb_qty
numbervar array monthly_vol [2]
...
@tot_qty
numbervar array monthly_vol ;
sum(monthly_vol [1] to [12]
--------------------
then was going to clear the array for the next part number.