Bennie47250
Programmer
Using Crystal 7.0 with a MS SQL 7.0 database
I have this working but it is going to take quite a few different formulas. Wondering if there is a better way.
The report needs to shows sales for each product family for each month for the current year and the previous year for a specific quarter
Here is an example for the First Quarter sales
Family: Blue Shoes
Current Year Prev Year
Month Qty Sales Qty Sales
1 50 2500 36 2300
2 70 3050 85 3200
3 40 2000 50 2800
Total 160 7550 171 7800
Avg Sales $ 47.19 45.61
Family: Red Shoes
Current Year Prev Year
Month Qty Sales Qty Sales
1 50 2500 36 2300
2 70 3050 85 3200
3 40 2000 50 2800
Total 160 7550 171 7800
Avg Sales $ 47.19 45.61
The way I’m doing this now:
When the user runs the report they are prompted for the Quarter and the Current Year
The report has 2 groups.
Group 1 = Family
Group 2 = Month
In Group 2 (Month) I creating multiple running totals.
The field to summarize is the Qty and Total Sales.
In Evaluate, I using a formula to determine the year and Month, it is
{Table.Year} = {?Year}
and
if {?Quarter} = 1 then { Table.Month) in [1]
else if {?Quarter} = 2 then { Table.Month} in [4]
else if {?Quarter} = 3 then { Table.Month} in [7]
else if {?Quarter} = 4 then { Table.Month} in [10]
In the Reset, I’m resetting on Group 2
The next running total is the same except that the evaluate sections is
{Table.Year} = {?Year}
and
if {?Quarter} = 1 then { Table.Month) in [2]
else if {?Quarter} = 2 then { Table.Month} in [5]
else if {?Quarter} = 3 then { Table.Month} in [8]
else if {?Quarter} = 4 then { Table.Month} in [11]
Doing it this way, I have to have 3 running totals for each Qty and Sales to determine the Qty and Sales.
Would appreciate any tips on how to better design this report using less formulas
I have this working but it is going to take quite a few different formulas. Wondering if there is a better way.
The report needs to shows sales for each product family for each month for the current year and the previous year for a specific quarter
Here is an example for the First Quarter sales
Family: Blue Shoes
Current Year Prev Year
Month Qty Sales Qty Sales
1 50 2500 36 2300
2 70 3050 85 3200
3 40 2000 50 2800
Total 160 7550 171 7800
Avg Sales $ 47.19 45.61
Family: Red Shoes
Current Year Prev Year
Month Qty Sales Qty Sales
1 50 2500 36 2300
2 70 3050 85 3200
3 40 2000 50 2800
Total 160 7550 171 7800
Avg Sales $ 47.19 45.61
The way I’m doing this now:
When the user runs the report they are prompted for the Quarter and the Current Year
The report has 2 groups.
Group 1 = Family
Group 2 = Month
In Group 2 (Month) I creating multiple running totals.
The field to summarize is the Qty and Total Sales.
In Evaluate, I using a formula to determine the year and Month, it is
{Table.Year} = {?Year}
and
if {?Quarter} = 1 then { Table.Month) in [1]
else if {?Quarter} = 2 then { Table.Month} in [4]
else if {?Quarter} = 3 then { Table.Month} in [7]
else if {?Quarter} = 4 then { Table.Month} in [10]
In the Reset, I’m resetting on Group 2
The next running total is the same except that the evaluate sections is
{Table.Year} = {?Year}
and
if {?Quarter} = 1 then { Table.Month) in [2]
else if {?Quarter} = 2 then { Table.Month} in [5]
else if {?Quarter} = 3 then { Table.Month} in [8]
else if {?Quarter} = 4 then { Table.Month} in [11]
Doing it this way, I have to have 3 running totals for each Qty and Sales to determine the Qty and Sales.
Would appreciate any tips on how to better design this report using less formulas