Good afternoon, all!
I need to compare the following Data side-by-side in a CR Year-over-Year for the following time periods:
1. YTD
2. MTD
3. Last Month
On one half of the report would be 2007 data and 2006 on the other side for TotalRevenue, Charges, and a couple of Formula Fields. Any ideas? I have toyed with creating Formula Fields for the 2006 data and throwing a between statement in the HAVING clause. I just wonder if there is a more efficient way to do this because we will use a scheduler to kick this off daily.
Looking for ideas . . .
I'm using the following Command to get data by time period through the Select Expert, I just need to combine them on the same report.
SELECT
"tblLoads"."BillToID",
"tblLoads"."BillToName",
AVG("tblLoads"."TotalRevenue"),
"tblLoads"."InvoiceDate",
YEAR(tblLoads.InvoiceDate),
"tblLoads"."PickupDate",
"tblLoads"."DeliveryDate",
"tblLoads"."LoadID",
SUM("tblLoadDispatch"."DriverPay") as Charges,
"tblLoads"."LoadClass",
"tblLoads"."Status",
"tblLoads"."Salesperson"
FROM tblLoads LEFT OUTER JOIN tblLoadDispatch ON (tblLoads.LoadID = tblLoadDispatch.LoadID)
GROUP BY
"tblLoads"."BillToID",
"tblLoads"."BillToName",
"tblLoads"."InvoiceDate",
"tblLoads"."PickupDate",
"tblLoads"."DeliveryDate",
"tblLoads"."LoadID",
"tblLoads"."TotalRevenue",
"tblLoads"."LoadClass",
"tblLoads"."Status",
"tblLoads"."Salesperson"
HAVING tblLoads.Status <> 'CANCELLED' And tblLoads.Status <> 'INACTIVE' AND tblLoads.LoadClass <> 'TLQUOTE' And tblLoads.LoadClass <> 'LTLQUOTE' and
ORDER BY tblLoads.Salesperson DESC, tblLoads.TotalRevenue DESC