i'm new to crystal and this forum and apologize up front for making up my own syntax to try to explain what i mean. i'd love any help anyone can offer.
background:
i have a report that shows sales for 3 diferent quarters. there are 3 groupings: product department, time period sold, and product class. the results of my report so far look like this:
dept num group 0
date range group 0 //QtrMain
class num group 0 $Sold
class num group 1 $Sold
class num group 2 $Sold
class num group 3 $Sold
date range group 1 //QtrPrevious
class num group 0 $Sold
class num group 1 $Sold
class num group 2 $Sold
class num group 3 $Sold
date range group 2 //QtrLastYear
class num group 0 $Sold
class num group 1 $Sold
class num group 2 $Sold
class num group 3 $Sold
dept num group 1
date range group 0 //QtrMain
class num group 0 $Sold
...
i now need to compare each class' $Sold from date range group 0 to those of date range groups 1 and 2.
what i thought i should do is drop each class' $Sold from each grouped quarter into an array so that i can use a for loop to make the calculations and show them in the report. something like this:
compSales := ((QtrMain.Class$Sold/QtrLastYear.Class$Sold) - 1) //sorry, i'm sure my syntax is way off...
here are my questions:
how can i "catch" each class' $Sold value?
do i need a for loop to go through the different classes in each department or is that handled within the grouping?
is there a better way to do what i'm trying to do?
background:
i have a report that shows sales for 3 diferent quarters. there are 3 groupings: product department, time period sold, and product class. the results of my report so far look like this:
dept num group 0
date range group 0 //QtrMain
class num group 0 $Sold
class num group 1 $Sold
class num group 2 $Sold
class num group 3 $Sold
date range group 1 //QtrPrevious
class num group 0 $Sold
class num group 1 $Sold
class num group 2 $Sold
class num group 3 $Sold
date range group 2 //QtrLastYear
class num group 0 $Sold
class num group 1 $Sold
class num group 2 $Sold
class num group 3 $Sold
dept num group 1
date range group 0 //QtrMain
class num group 0 $Sold
...
i now need to compare each class' $Sold from date range group 0 to those of date range groups 1 and 2.
what i thought i should do is drop each class' $Sold from each grouped quarter into an array so that i can use a for loop to make the calculations and show them in the report. something like this:
compSales := ((QtrMain.Class$Sold/QtrLastYear.Class$Sold) - 1) //sorry, i'm sure my syntax is way off...
here are my questions:
how can i "catch" each class' $Sold value?
do i need a for loop to go through the different classes in each department or is that handled within the grouping?
is there a better way to do what i'm trying to do?