I'm writing a report that will run on Monday of every week. It is meant to capture data from the past business week. The problem is that in this particular table, the date is in numeric format MMddyy. So here is my Select formula:
local numbervar TodaysDate := tonumber(totext(currentdate,'MMddyy'));
local numbervar LWDay1 := TodaysDate - 700;
local numbervar LWDay2 := TodaysDate - 600;
local numbervar LWDay3 := TodaysDate - 500;
local numbervar LWDay4 := TodaysDate - 400;
local numbervar LWDay5 := TodaysDate - 300;
{XFER.XfrDate} in [LWDay1, LWDay2, LWDay3, LWDay4, LWDay5]
Unfortunately this runs for an inordinate length of time. I've never actually had the patience to see if it completes, and end up using task manager to shut down crystal reports after 10 minutes or so.
Any thoughts on why this happens, or how to do this better?
Thanks