How to add expression.

I have two parameters called back_dt and entry_dt .

On my report I want to display back_dt but if back_dt is null , I want to display entry_dt.

I have created the parameters and added both the parameters to my report and in the "print when expression " field for the back_dt I am giving this expression

Boolean.valueOf( null == $P{BACK_DATE} ? $P{ENTRY_DATE}:$P{BACK_DATE})

Nothing is being displayed ?

How can I display back date ?

Please help if I am doing the right way

 

 

 

 

shikhap's picture
17
Joined: Jul 7 2008 - 2:23am
Last seen: 15 years 2 months ago

1 Answer:

One way would be create a variable called display_dt using something like:

$P{BACK_DATE} == null?$P{ENTRY_DATE}:$P{BACK_DATE}

then the text_field would use display_dt.

hangman01's picture
1843
Joined: Jun 21 2007 - 10:00am
Last seen: 16 years 3 months ago
Feedback
randomness