Month to Date/Year to Date in same report
Month to Date/Year to Date in same report
(OP)
I am using CR7 and have a table which details sales info by Doc ref. Each record shows Stock No, units sold, sales value and cost value.
Is there a way I can sumarize to show in one line the Stock No, Units Sold, Sales Value and Cost Value for Month to Date and Year to Date without having to create a sub report.
Thanks
Ralph
Is there a way I can sumarize to show in one line the Stock No, Units Sold, Sales Value and Cost Value for Month to Date and Year to Date without having to create a sub report.
Thanks
Ralph
RE: Month to Date/Year to Date in same report
First create a Group by StockNo
Next create for each item you want to show(e.g. UnitsSold), formulas as follows:
MTDUnits
If SalesTranDate in PrintDate-(Day(PrintDate)-1) to PrintDate then UnitsSold
YTDUnits
If SalesTranDate in Date(Year(Printdate),1,1) to PrintDate then UnitsSold
etc.
Then use each formula as the basis for a running total placed on the GroupFooter for Stockno. and resetting to zero with a ResetTotal() formula placed in the GroupHeader for StockNo
That way your Group Footer line will read:
StockNo. RTMTDUnits RTMTDSales RTMTDCosts RTYTDUnits RTYTDSales RTYTDCosts or whatever sequence you want to put them in.
Hope this helps
David C. Monks
david.monks@chase-international.com
http://www.chase-international.com
Accredited Seagate Enterprise Partner
RE: Month to Date/Year to Date in same report
If {date} in yearToDate then {Units} else 0
and
If {date} in monthToDate then {Units} else 0
Group by product, and do subtotals of these formulas by product.
Ken Hamady
http://www.kenhamady.com/
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)