pompeighu Posted February 16, 2007 Share Posted February 16, 2007 Hi, when i retrieve data from database and i put it inmy report like this $F{names} i don't know how to make certain data to have a certain format for example....i retrieve names from a database and i want the names that begin with letter A be underlined or bold...how do i do that? Link to comment Share on other sites More sharing options...
lucianc Posted February 16, 2007 Share Posted February 16, 2007 Use a conditional style for this:Code:<style name="NameStyle"> <conditionalStyle> <conditionExpression>Boolean.valueOf($F{name}.startsWith("A"«»))</conditionExpression> <style isUnderline="true" isBold="true" pdfFontName="..Bold"/> </conditionalStyle></style> HTH,Lucian Link to comment Share on other sites More sharing options...
pompeighu Posted February 16, 2007 Author Share Posted February 16, 2007 Hi thank you, i did it. Now i just want to know how to put that data in a rectangle. How should i modify the style? Link to comment Share on other sites More sharing options...
lucianc Posted February 21, 2007 Share Posted February 21, 2007 Set a border for the style. Also check the samples included in the JasperReports project package (under demo/samples), you can learn a lot from them. Regards,Lucian 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