M
mgp
I need some help with a2k reports.
I've tried different methods of reporting but I either
have too long SQL stmt or errors in the results.
I'm trying to report a summary of sales during the last
52 weeks for each customer. My table consist of:
Orders
______
CustName
TransDate
QtySold
UnitPrice
My report needs to summarize the QtySold for each week in
the last 52 weeks to show patterns. This is what I expect
to see as results:
CoABC 3 4 1 2 4 9 11 4 2 0 0 ...
CoDEF 0 1 2 0 4 6 13 6 3 1 1 ...
....
If I try to create a SQL stmt defining all 52 fields, I
get an error that it is too long. If I define the fields
in the Detail section of the report and print them in the
category CustName of the report, I get 3e+01 when nothing
should be showing. I've tried different ways but can't
seem to get it going. Out of frustration, I've tried Dsum
but it really slows it down and I still get the errors.
For example =IIf([Count or Dollars (c/d)]="c",DSum
("[QtySold]/24","Orders","DatePart('ww',[TransDate])
=1"),DSum("[QtySold]*[UnitPrice]","Orders","DatePart('ww',
[TransDate])=1"))
Help?!
I've tried different methods of reporting but I either
have too long SQL stmt or errors in the results.
I'm trying to report a summary of sales during the last
52 weeks for each customer. My table consist of:
Orders
______
CustName
TransDate
QtySold
UnitPrice
My report needs to summarize the QtySold for each week in
the last 52 weeks to show patterns. This is what I expect
to see as results:
CoABC 3 4 1 2 4 9 11 4 2 0 0 ...
CoDEF 0 1 2 0 4 6 13 6 3 1 1 ...
....
If I try to create a SQL stmt defining all 52 fields, I
get an error that it is too long. If I define the fields
in the Detail section of the report and print them in the
category CustName of the report, I get 3e+01 when nothing
should be showing. I've tried different ways but can't
seem to get it going. Out of frustration, I've tried Dsum
but it really slows it down and I still get the errors.
For example =IIf([Count or Dollars (c/d)]="c",DSum
("[QtySold]/24","Orders","DatePart('ww',[TransDate])
=1"),DSum("[QtySold]*[UnitPrice]","Orders","DatePart('ww',
[TransDate])=1"))
Help?!