一部のレポートを Crystal から Jasper に変換する必要がありますが、Groovy は頭痛の種です。複数の「if」を含む式があります。
if (cond) then expr1 else expr2 endif.
iReport ではこれが発生します(cond) ? expr1 : expr2
が、別の if 条件があり、それを最初の条件の下に配置すると、エラーが発生します。アドバイスをいただけますか?ありがとうございました!
変換する式:
if not isnull({ZEM0000_T.PRUEFMERKMAL}) then
text = {ZEM0000_T.PRUEFMERKMAL}
else
text = ""
end if
if not isnull ({ZEM0000_T.ANWEISUNG1}) then
text = text & Chr(13) & trim({ZEM0000_T.ANWEISUNG1})
end if
if not isnull ({ZEM0000_T.ANWEISUNG2}) then
text = text & Chr(13) & trim({ZEM0000_T.ANWEISUNG2})
end if
if not isnull ({ZEM0000_T.ANWEISUNG3}) then
text = text & Chr(13) & trim({ZEM0000_T.ANWEISUNG3})
end if
if not isnull ({@OT_NM_UT_2}) then
text = text & Chr(13) & {@OT_NM_UT_2}
end if
formula = text