TVicky
TVicky

Reputation: 399

How to show a default text '---' instead of blanks in crystal reports?

I have a crystal report in which I need to show a default text '---' wherever there are blank values for a field called ExpectedInDate.I am trying to achieve this using this formula:

IF isnull({DamageRepairEntry.ExpectedInDate}) THEN 
"N/A"

But there are a few issues, firstly I am confused as to where this formula should be written, secondly wherever I try to write this formula, I get an error :"The result of the formula should be a Boolean".Kindly help me with this, also forgive me if this seems like a silly question.

Upvotes: 0

Views: 1816

Answers (1)

Ryan
Ryan

Reputation: 7287

A suppress formula only dictates whether the field displays on the report or not, which is why it must evaluate to a boolean value (true to suppress, false to display). Instead, you need to create a new standalone formula:

if isnull({DamageRepairEntry.ExpectedInDate}) then "--"
 else totext({DamageRepairEntry.ExpectedInDate})

Then place this new standalone formula object in your report instead of the ExpectedInDate database field.

Upvotes: 2

Related Questions