Hi all. I'm looking to calculate the previous year result for sales, based to a date criteria .
For example, my user enter a date period (Ex. 01-01-2005 to 31-01-2005). I use this criteria to filter the results from an order table (think NorthWind Orders). I group by customer no, and get the sales for jan. 2005 on one column. On the other column (on the same line), I want the result for the previous year (01-01-2004 to 31-01-2004)
Ex.
Results for 01-01-2005 to 31-01-2005
Customer : BARRTOK
Sales Current Previous Year
2,000.00$ 1,566.77$
I'm new in Crystal SQL programming and I don't know how to achieve this
I don't want to use a cross-tab because the user wants to calculate a performance ratio.
I'm using Crystal 10 with SQL Server 2000
Thanks in advance.
Nro
For example, my user enter a date period (Ex. 01-01-2005 to 31-01-2005). I use this criteria to filter the results from an order table (think NorthWind Orders). I group by customer no, and get the sales for jan. 2005 on one column. On the other column (on the same line), I want the result for the previous year (01-01-2004 to 31-01-2004)
Ex.
Results for 01-01-2005 to 31-01-2005
Customer : BARRTOK
Sales Current Previous Year
2,000.00$ 1,566.77$
I'm new in Crystal SQL programming and I don't know how to achieve this
I don't want to use a cross-tab because the user wants to calculate a performance ratio.
I'm using Crystal 10 with SQL Server 2000
Thanks in advance.
Nro