Trying translate crystal report if-else to c# if-else

ElItE_HaXoR

New Member
I'm trying to rewrite the below statement to a c# statement so that I can use if in my program. I don't understand crystal report fomula enough to get it rewritten.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) Else "";
 
Back
Top