chris_latham1 Posted January 29, 2014 Share Posted January 29, 2014 Hi Guys,I am developing a report and I want to create a custom field that displays 'Y' or 'N' depending on criteria.As an example the report currently has the following data:MakeColourSeatsMazdaRed2BMWSilver4I would like to have a column like below based on criteria:MakeColourSeatsIs Convertible?MazdaRed2YBMWSilver4NThe column 'is convertible' must be based on the 'Seats' column. Thanks, Chris Link to comment Share on other sites More sharing options...
Solution Tom C Posted January 29, 2014 Solution Share Posted January 29, 2014 You can use ternary conditional assignment in your report field expression to derive 'is convertible' value based on 'Seats' content. Something like:$F{Seats}.intValue()==2?"Y":"N" Link to comment Share on other sites More sharing options...
butlerc Posted January 30, 2014 Share Posted January 30, 2014 alternatively you could add another column into your database query, that did some sort of case statement, ie; CASE WHEN SEATS = 2 THEN 'Y' ELSE 'N' END as IS_CONVERTIBLE 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