Ireport Jasper Reports formatting data

0
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?
pompeighu's picture
Joined: Feb 15 2007 - 1:21am
Last seen: 7 years 8 months ago

3 Answers:

0
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>
 
</td></tr></tbody></table>
 
 
 
HTH,
 
Lucian
lucianc's picture
5279
Joined: Jul 17 2006 - 1:10am
Last seen: 1 month 4 weeks ago
0
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?
pompeighu's picture
Joined: Feb 15 2007 - 1:21am
Last seen: 7 years 8 months ago
0
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
lucianc's picture
5279
Joined: Jul 17 2006 - 1:10am
Last seen: 1 month 4 weeks ago
Feedback