I have an Open order Report that shows the total $ on order by customer, by month. It dynamically changes according to the current date (i.e. if the month is Nov, then it shows 12 months from Nov). However, it is not picking up the orders where the date field (shipexpiredate) has already passed. I want to include all order totals for all previous months in the current (1st) month total. Here is an example of the formula I am using to get the month totals;
------------------------------------
Local DateVar d := ({SO1_SOEntryHeader.ShipExpireDate});
local datevar g := (currentdate) ;
Local DateVar Range dr0;
dr0 := DateSerial (Year(g), Month(g),1 - 1 ) To
DateSerial (Year(g), Month(g) + 1, 1 - 1);
if d in dr0 then {@Total Open Orders}
-----------------------------------
The report looks like this:
customer name month1 month2 month3 month4
Retail Store 300.00 240.00 20.00 95.00
Retail Store2 0.00 25.00 30.00 15.00
Total all cust --------------------------
300.00 265.00 50.0 110.00
Month1= the month of the current date. Month2-all orders whose shipexpiredate in next month, etc.
How do I need to change my date formula for the first month to get order totals for all orders whose shipexpiredate was in current month or any month previous?
------------
Question - 2 (Am I allowed 2 questions?)
I need to change the date formula to accomodate for year changes. So if I run it today for November, when the report is figuring Month3 it will pull Jan2004 info and not Jan2003.
Thanks in advance,
Sunny
------------------------------------
Local DateVar d := ({SO1_SOEntryHeader.ShipExpireDate});
local datevar g := (currentdate) ;
Local DateVar Range dr0;
dr0 := DateSerial (Year(g), Month(g),1 - 1 ) To
DateSerial (Year(g), Month(g) + 1, 1 - 1);
if d in dr0 then {@Total Open Orders}
-----------------------------------
The report looks like this:
customer name month1 month2 month3 month4
Retail Store 300.00 240.00 20.00 95.00
Retail Store2 0.00 25.00 30.00 15.00
Total all cust --------------------------
300.00 265.00 50.0 110.00
Month1= the month of the current date. Month2-all orders whose shipexpiredate in next month, etc.
How do I need to change my date formula for the first month to get order totals for all orders whose shipexpiredate was in current month or any month previous?
------------
Question - 2 (Am I allowed 2 questions?)
I need to change the date formula to accomodate for year changes. So if I run it today for November, when the report is figuring Month3 it will pull Jan2004 info and not Jan2003.
Thanks in advance,
Sunny