Greg
Greg

Reputation: 47124

Birt - How to display a default value for a data row element

So I want a field in my table to show the value from the data if it is not blank, and show some text otherwise.

I tried using this as my expression:

dataSetRow["date_billed"] || "Not Yet Billed"

But it didn't seem to work.

Is there a trick I'm missing?

Upvotes: 0

Views: 3185

Answers (1)

user359040
user359040

Reputation:

Try replacing the existing data field with a Dynamic Text report item, containing the following expression:

{row["date_billed"]>"" ? row["date_billed"] : "Not Yet Billed"}

Upvotes: 1

Related Questions