Crystal Report If formula with multiple conditions

  Kiến thức lập trình

I’m getting an error message with this formula but can’t see the wood for the trees of what’s missing – please help!

if {vehinv_rec.master_class_2} = “RCV” and if {vehinv_rec.chassis_model} in
“ME4”] then “Uncompliant” else
if {vehinv_rec.master_class_2} = “RCV” and {vehinv_rec.gvw_kg} > 18000 then “Compliant” else “Out of Scope”

I keep getting an error saying THEN is missing, but I can’t see where?