Crystal Reports formula for detail field value "1" to equal OK.

I am using visual studio crystal reports.
A crystal reports detail field receives a value of "1" from a .net checkbox by default.
I need a sample formula for the detail field value "1" to convert to the value "OK".

If the .net checkbox is unchecked the detail field would show no value.

Thanks
dave_skyAsked:
Who is Participating?
 
crgary_txConnect With a Mentor Commented:
create a formula:
//@ok
if {table.field} = 1 then 'OK'
else
""

hth
Gary
0
 
dave_skyAuthor Commented:
Thanks for the response.

I used this formula:
if{tblSprinklerWorkorderDetail2.FunctionOK} = 1 then 'OK'
else
""
I get an error message - The result of selection formula must be a boolean.
0
 
RickJConnect With a Mentor Commented:
I think you have put the formula in a selection formula.
You need to create a formula field and drop it on the report.
In your field explorer right click on Formula Field and click "New"
Once it is created, drag from the explorer to your report.
0
 
dave_skyAuthor Commented:
RickJ,

You are so right. I was trying to create the formula in a selection formula.

Thanks for the rescue!
0
 
RickJCommented:
Thanks,
Glad I could help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.