ewallace Posted April 6, 2017 Share Posted April 6, 2017 I'm trying to get two date ranges to show up with the word "AND" in the middle of it if both fields are not null. I can't have the end date showing up with the "and" if the beginning date is null. I've tried a few things.Here's one:($P{p_trip_entry_begin} != null) ? $P{p_trip_entry_begin} : ($P{p_trip_entry_end} != null) ? ($P{p_trip_entry_begin} != null + " AND " + $P{p_trip_entry_end} != null) : ""Another one I tried was doing a print when express on the text field of " AND " when the end date is not null, but i'm not sure if there is a way to tell it to print the AND if BOTH are not null.. is there a way? Link to comment Share on other sites More sharing options...
szaharia Posted May 8, 2017 Share Posted May 8, 2017 Try($P{p_trip_entry_begin} != null ? $P{p_trip_entry_begin} + ($P{p_trip_entry_end} != null ? " AND ":"") : "") + ($P{p_trip_entry_end} != null ? $P{p_trip_entry_end}.toString() : "")[/code] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now