I have 2 years worth of forecasts stored in my MSC_TBL. I've written a crystal report to pull through quantities forecast by month, starting with the current month and showing a rolling 12 months.
Using the following I'm returning both 2010 & 2011 values. I want to bring back only 2010 if it exists, if not then only 2011 values.
if month({MSC_TBL.MSC_DUE_DATE})={@month1}AND
YEAR ({MSC_TBL.MSC_DUE_DATE})=YEAR(TODAY)then{MSC_TBL.MSC_ORIG_QTY}
else
if month({MSC_TBL.MSC_DUE_DATE})={@month1}AND
year ({MSC_TBL.MSC_DUE_DATE})=(year(today)+1)then {MSC_TBL.MSC_ORIG_QTY}
else 0
Any help greatly appreciated.