For my report I would like to have crystal pull up the previous months sales data. So for example if this month is October 2009, then I would want September 2009 sales.
But I've come across a problem that I need help with, let's say that the current month is January 2010, then I would want Sales data for December of 2009. I don’t know of a formula since I would be pulling data from the previous year.
So if here is my basic formula that I have. (I need help with the first line).
If Month (CurrentDate)=1 then (Need help here);
If Month (CurrentDate)=2 then {IM9_ItemSalesDetailWhse.QtySoldPeriod1};
If Month (CurrentDate)=3 then {IM9_ItemSalesDetailWhse.QtySoldPeriod2};
If Month (CurrentDate)=4 then {IM9_ItemSalesDetailWhse.QtySoldPeriod3};
If Month (CurrentDate)=5 then {IM9_ItemSalesDetailWhse.QtySoldPeriod4};
If Month (CurrentDate)=6 then {IM9_ItemSalesDetailWhse.QtySoldPeriod5};
If Month (CurrentDate)=7 then {IM9_ItemSalesDetailWhse.QtySoldPeriod6};
If Month (CurrentDate)=8 then {IM9_ItemSalesDetailWhse.QtySoldPeriod7};
If Month (CurrentDate)=9 then {IM9_ItemSalesDetailWhse.QtySoldPeriod8};
If Month (CurrentDate)=10 then {IM9_ItemSalesDetailWhse.QtySoldPeriod9};
If Month (CurrentDate)=11 then {IM9_ItemSalesDetailWhse.QtySoldPeriod10};
If Month (CurrentDate)=12 then {IM9_ItemSalesDetailWhse.QtySoldPeriod11}
else 0
Thanks to anyone that can help me, I really appreciate it.
But I've come across a problem that I need help with, let's say that the current month is January 2010, then I would want Sales data for December of 2009. I don’t know of a formula since I would be pulling data from the previous year.
So if here is my basic formula that I have. (I need help with the first line).
If Month (CurrentDate)=1 then (Need help here);
If Month (CurrentDate)=2 then {IM9_ItemSalesDetailWhse.QtySoldPeriod1};
If Month (CurrentDate)=3 then {IM9_ItemSalesDetailWhse.QtySoldPeriod2};
If Month (CurrentDate)=4 then {IM9_ItemSalesDetailWhse.QtySoldPeriod3};
If Month (CurrentDate)=5 then {IM9_ItemSalesDetailWhse.QtySoldPeriod4};
If Month (CurrentDate)=6 then {IM9_ItemSalesDetailWhse.QtySoldPeriod5};
If Month (CurrentDate)=7 then {IM9_ItemSalesDetailWhse.QtySoldPeriod6};
If Month (CurrentDate)=8 then {IM9_ItemSalesDetailWhse.QtySoldPeriod7};
If Month (CurrentDate)=9 then {IM9_ItemSalesDetailWhse.QtySoldPeriod8};
If Month (CurrentDate)=10 then {IM9_ItemSalesDetailWhse.QtySoldPeriod9};
If Month (CurrentDate)=11 then {IM9_ItemSalesDetailWhse.QtySoldPeriod10};
If Month (CurrentDate)=12 then {IM9_ItemSalesDetailWhse.QtySoldPeriod11}
else 0
Thanks to anyone that can help me, I really appreciate it.
