我想知道水晶报告if else条件数和字符串fourmula错误

时间:2012-11-14 10:01:45

标签: crystal-reports

    if {?type} ='Rent' then
    (if {realestate_repository_plantclass.rentprice}<>0 then
    (
        if{realestate_repository_plantclass.rentprice}<>55.50 then
        {realestate_repository_plantclass.rentprice}
        else
    nn;
    )

    )
    else
    (
    if {realestate_repository_plantclass.sellprice}<>0 then
    {realestate_repository_plantclass.sellprice}

)

1 个答案:

答案 0 :(得分:0)

if {?type} ='Rent' then (
  if {realestate_repository_plantclass.rentprice}<>0 then (
    if{realestate_repository_plantclass.rentprice}<>55.50 then
      {realestate_repository_plantclass.rentprice}
    else
      nn;  //you don't need a semi-colon here; also, what is 'nn'?
  )
)
else (
  if {realestate_repository_plantclass.sellprice}<>0 then
    {realestate_repository_plantclass.sellprice}
)