我正在尝试将以下语句重写为 ac# 语句,以便我可以在我的程序中使用 if。我对水晶报告公式的理解不足以将其重写。
If Not IsNull({RET_USER_INFORMATION.TX_PHONE_WORK}) And Length (ToText({RET_USER_INFORMATION.TX_PHONE_WORK},0,"")) > 1 Then "(" & Mid (ToText({RET_USER_INFORMATION.TX_PHONE_WORK},0,""), 1, 3) & ") " & Mid (ToText({RET_USER_INFORMATION.TX_PHONE_WORK},0,""), 4, 3) &" - "& Mid (ToText({RET_USER_INFORMATION.TX_PHONE_WORK},0,""), 7, 4) 否则 "";