문제

For one string field in crystal report i wish to write up formula where if that field is null, it should display as "No value" else the actual values should come up

What i have written is

Local StringVar x; If {mysp;1.mystringfield} ="" or IsNull({mysp;1.mystringfield}) then x := "No value"; Else x := {mysp;1.mystringfield}

The bold marked shows error saying "the remaining text does not appear to be part of the formula crystal reports"

Whats incorrect in my formula?

Let me know for more inputs

thanks

도움이 되었습니까?

해결책

I think you need to remove the ; and wrap the or in brackets:

Local StringVar x; 

If (IsNull({mysp;1.mystringfield}) or {mysp;1.mystringfield} ="") then 
x := "No value"
Else x := {mysp;1.mystringfield}

다른 팁

IF Isnull({mysp;1.mystringfield}) Then
  "No Value"
Else
  {mysp;1.mystringfield}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top