JasonKaufman
Programmer
I am using CR Developer, version 11
Sales info is in monthly buckets of an array: 0;0;0;0;0;0;1203;72;99;96;75;111;0
The Year is a selectable field by itself
The idea is to have a report where the end user can choose a month number. This selection would then pull the sales data for that month and the next three months of the previous year.
My problem is how to write the formula for when the month selected is either 10,11,or 12 so that it would roll to the next year and months 1,2 and/or 3.
current formula is:
(local stringvar array x;
x:=split({oe_hist_prod.units-shipped}, ";");
tonumber(x[{?Month-Start}])
+
(local stringvar array x;
x:=split({oe_hist_prod.units-returned-rstkd}, ";");
tonumber(x[{?Month-Start}])
+
(local stringvar array x;
x:=split({oe_hist_prod.units-returned-nrstkd}, ";");
tonumber(x[{?Month-Start}])
The 2nd half of the report would take the current year's open PO quantity for the same months selected for sales.
The PO Date is like: mm/dd/year.
So would also need to be able to have that roll over to the future year if month selected is 10,11, or 12.
Thanks for any help provided.
Sales info is in monthly buckets of an array: 0;0;0;0;0;0;1203;72;99;96;75;111;0
The Year is a selectable field by itself
The idea is to have a report where the end user can choose a month number. This selection would then pull the sales data for that month and the next three months of the previous year.
My problem is how to write the formula for when the month selected is either 10,11,or 12 so that it would roll to the next year and months 1,2 and/or 3.
current formula is:
(local stringvar array x;
x:=split({oe_hist_prod.units-shipped}, ";");
tonumber(x[{?Month-Start}])
+
(local stringvar array x;
x:=split({oe_hist_prod.units-returned-rstkd}, ";");
tonumber(x[{?Month-Start}])
+
(local stringvar array x;
x:=split({oe_hist_prod.units-returned-nrstkd}, ";");
tonumber(x[{?Month-Start}])
The 2nd half of the report would take the current year's open PO quantity for the same months selected for sales.
The PO Date is like: mm/dd/year.
So would also need to be able to have that roll over to the future year if month selected is 10,11, or 12.
Thanks for any help provided.