Skip to Content
Former Member
Jun 04, 2008 at 12:36 AM

Same Store Sales


Using Crystal Reports XI, querying an Access 2003 database with a SQL statement.

My report layout is like this:

Group 1 = Region

Group 2 = Item Type

Group 3 = Item Class

Group 4 = Store

Detail Section - line item detail from invoices (e.g. $$, date)

Group 4 footer

Group 3 footer

Group 2 footer

Group 1 footer

I have a formula for Current Year Net Sales in the Group 4 (store) footer:

if Sum ({@PriYr4wkSale}, {})+Sum ({@PriYr4wkSpl}, {}) = 0 then
    Sum ({@CurYr4wkSale}, {})+Sum ({@CurYr4wkSpl}, {})

This calculates the net sales for the Prior Year. If the previous year sales are zero, then I set the current year net sales to zero, other wise I calculate the current year net sales. I do the same thing for Prior year net sales, but in reverse (if current year is 0, then 0, else calculate prior year).

This gives me correct same store sales data per store. In other words, in the Group 4 footer, I see $0 and $0 for current and prior year if one or both are zero, but if both are non zero then they amount is shown.

My problem is that I want to show the total of the same store sales for goup 3, group 2 and group 1, and CR won't let me summarize that formula.

How can I show true same store sales?