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 6 months ago

3 Answers:

0
Use a conditional style for this:
Code:
<br />
<style name="NameStyle"><br />
  <conditionalStyle><br />
    <conditionExpression>Boolean.valueOf($F{name}.startsWith("A"«»))</conditionExpression><br />
    <style isUnderline="true" isBold="true" pdfFontName="..Bold"/><br />
  </conditionalStyle><br />
</style><br />
</td></tr></tbody></table><br />
<br />
HTH,<br />
Lucian
lucianc's picture
5281
Joined: Jul 17 2006 - 1:10am
Last seen: 2 days 13 hours 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 6 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
5281
Joined: Jul 17 2006 - 1:10am
Last seen: 2 days 13 hours ago
Feedback
randomness