Help!!
I have attached an example forecast report that I have produced in Crystal Reports XI - release 2.
Based on the Estimated Close Date and Bill Frequency there are certain calculations (Mainly adding Months to the Estimated Close Date). I have included my code.
The {Sheet1_.Monthstart} is an Excel spreadsheet listing the dates.
Select {OPPORTUNITY.TVL_BILLING_FREQUENCY}
Case "Quarterly in advance":
If (Month ({Sheet1_.Monthstart})=Month (DateAdd("m",1,{OPPORTUNITY.ESTIMATEDCLOSE}))) Then ({OPPORTUNITY.TVL_PS_FEE} /2) + ({OPPORTUNITY.TVL_PILOT_VALUE} /2) Else
If (Month ({Sheet1_.Monthstart})=Month (DateAdd("m",3,{OPPORTUNITY.ESTIMATEDCLOSE}))) Then ({OPPORTUNITY.TVL_PS_FEE} /2) + ({OPPORTUNITY.TVL_PILOT_VALUE} /2) + ((({OPPORTUNITY.TVL_LICENCEVALUE} /12)* 3)) + ((({OPPORTUNITY.TVL_ANNUAL_HOSTING} /12) * 3)) + ({OPPORTUNITY.TVL_OTHER_FEES}) Else
If (Month ({Sheet1_.Monthstart})=Month (DateAdd("m",6,{OPPORTUNITY.ESTIMATEDCLOSE}))) Then ((({OPPORTUNITY.TVL_LICENCEVALUE} /12)* 3)) + ((({OPPORTUNITY.TVL_ANNUAL_HOSTING} /12) * 3)) Else
If (Month ({Sheet1_.Monthstart})=Month (DateAdd("m",9,{OPPORTUNITY.ESTIMATEDCLOSE}))) Then ((({OPPORTUNITY.TVL_LICENCEVALUE} /12)* 3)) + ((({OPPORTUNITY.TVL_ANNUAL_HOSTING} /12) * 3)) Else
If (Month ({Sheet1_.Monthstart})=Month (DateAdd("m",12,{OPPORTUNITY.ESTIMATEDCLOSE}))) Then ((({OPPORTUNITY.TVL_LICENCEVALUE} /12)* 3)) + ((({OPPORTUNITY.TVL_ANNUAL_HOSTING} /12) * 3))
Case "One Off":
If (Month ({Sheet1_.Monthstart})=Month (DateAdd("m",1,{OPPORTUNITY.ESTIMATEDCLOSE}))) and ({Sheet1_.Monthstart} > Datetime("Sept 12")) Then {@First_Year_Fees}
As you can see from the example report I have highlighted two figures, these figures are actually for Dates not specified on the report > Sept 12. They seen to wrap.
How do I ensure that these dates don't wrap.
If someone can point me the right direction I would be grateful...
Thank you, please ask further questions if requried.