15 pts.
 Crystal Reports 9 Formulas
I am using Crystal 9 reports. The formula is an IF formula but one of the columns returns as a blank as there is no data, crystal doesn't read this as a value < 0 as it is blank, how can I get crystal to read a blank in the data field whilst writing a formula?

the formula is below but it won't accept {resrooms.actroomrate} ="" with "" representing a blank, I have tried <0 also, still won't accept.

Any ideas??

if {resrooms.actroomrate} > 0 then {resrooms.actroomrate} else (if {resrooms.actroomrate} ="" then {resrooms.roomrate})



Software/Hardware used:
Crystal 9.0
ASKED: October 5, 2010  2:32 AM
UPDATED: October 6, 2010  9:24 PM

Answer Wiki:
If ISNULL({resrooms.actroomrate}) then "" else {resrooms.roomrate} So if the resrooms.actroomrate is blank then show nothing otherwise show resrooms.roomrate
Last Wiki Answer Submitted:  October 6, 2010  9:24 pm  by  Christy0825   15 pts.
All Answer Wiki Contributors:  Christy0825   15 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

What do you mean by “won’t accept” ? Are you getting errors ?

Have you tried using the IsNull function ?

 63,535 pts.

 

there isn’t an error but the formula is returning a blank whereby it should return a value. I have never used an IsNull function how does that work?
i am new to crystal.

 15 pts.

 

It would be something like this:

If IsNull({resrooms.actroomrate}) then {resrooms.roomrate}
Else (if {resrooms.actroomrate} > 0 then {resrooms.actroomrate})

Look for the IsNull documentation in Crystal Report’s help.

 63,535 pts.