howudodat Posted April 1, 2010 Share Posted April 1, 2010 I have a field $F{Telephone} if the first char of the field is a '!' I want the field to be displayed with strikethrough font and trim the '!' so:111-222-3333 would print as is!444-555-6666 would print as 444-555-6666 (underline = strikethrough)Not sure how to set that upPeter Link to comment Share on other sites More sharing options...
dnvsrikanth Posted April 5, 2010 Share Posted April 5, 2010 Hi Peter, You can do that using styles in the report. Use the following expression in style and set isStrikeThrough to TRUE in the style. DNV Srikanth.Code:$F{Telephone}.indexOf( "!" ) == 0 ? Boolean.TRUE : Boolean.FALSEisStrikeThrough="true" Link to comment Share on other sites More sharing options...
howudodat Posted April 5, 2010 Author Share Posted April 5, 2010 Perfect. Here is the final code I used: Peter Code: <style name="strike"> <conditionalStyle> <conditionExpression> $F{telephone}.indexOf( "!" ) == 0 ? Boolean.TRUE : Boolean.FALSE </conditionExpression> <style isStrikeThrough="true" /> </conditionalStyle> </style> 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