Crystal report with if statement & Variable not working
Hi,
I have a crystal report (crystal reports basic 2008) thats referencing a microsoft access 2003 query named: " qry_CRYSTAL_REP_FORECAST_PARTCODE" as its data source. Within the report I have a formular field with the below code: The problem is when i try to save and close the formualr the software says: "The remaining text does not appear to be part of the formular" so i guess the syntax i have is incorrect but im not sure what needs to be changed to fix?, please help
if {qry_CRYSTAL_REP_FORECAST_PARTCODE.ACTUALS_TO_PD}>0
then pdact
else if {qry_CRYSTAL_REP_FORECAST_PARTCODE.FORECAST_1_INCL_BASE}=0 AND {qry_CRYSTAL_REP_FORECAST_PARTCODE.FORECAST_1_PROMO_QTY}>0
then promoqty
//if criteria not met above then use the below for field
else {qry_CRYSTAL_REP_FORECAST_PARTCODE.FORECAST_1_BASE_QTY} + promoqty
if {qry_CRYSTAL_REP_FORECAST_PARTCODE.ACTUALS_TO_PD}>0
then pdact
else if {qry_CRYSTAL_REP_FORECAST_PARTCODE.FORECAST_1_INCL_BASE}=false AND {qry_CRYSTAL_REP_FORECAST_PARTCODE.FORECAST_1_PROMO_QTY}>0
then promoqty
//If criteria not met above then use the below for field
else {qry_CRYSTAL_REP_FORECAST_PARTCODE.FORECAST_1_BASE_QTY} + promoqty
else if {qry_CRYSTAL_REP_FORECAST_