Question

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

Was it helpful?

Solution

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}

OTHER TIPS

IF Isnull({mysp;1.mystringfield}) Then
  "No Value"
Else
  {mysp;1.mystringfield}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top