<html> <head> <META http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Report Design</title> <link rel="stylesheet" type="text/css" href="../../../../style.css"> </head> <body> <div class="CommonContent"> <div class="CommonContentArea"> <h1>Report Design</h1> <p>Let's create a report representing pilots in a table. The table will have 2 fields: "Name" and "Points". The fields should be defined like this:</p> <p><code><field name="Name" class="java.lang.String"/></code></p> <p><code><field name="Points" class="java.lang.Integer"/></code></p> <p>The field values - $F{Name} and $F{Points} - can be used in the table part of the report:</p> <p><code><detail></code></p> <p><code> <band height="15"></code></p> <p><code> <textField bookmarkLevel="2"></code></p> <p><code> <reportElement x="150" y="0" width="175" height="15"/></code></p> <p><code> <box leftBorder="Thin" bottomBorder="Thin" leftPadding="10" rightPadding="10"/></code></p> <p><code> <textElement textAlignment="Left"/></code></p> <p><code> <textFieldExpression class="java.lang.String">$F{Name}</textFieldExpression></code></p> <p><code> <anchorNameExpression>$F{Name} + " (" + $F{Points} + ")"</anchorNameExpression></code></p> <p><code> </textField></code></p> <p><code> <textField isStretchWithOverflow="true"></code></p> <p><code> <reportElement positionType="Float" x="325" y="0" width="50" height="15"/></code></p> <p><code> <box leftBorder="Thin" bottomBorder="Thin" rightBorder="Thin" leftPadding="10" rightPadding="10"/></code></p> <p><code> <textElement textAlignment="Right"/></code></p> <p><code> <textFieldExpression class="java.lang.Integer">$F{Points}</textFieldExpression></code></p> <p><code> </textField></code></p> <p><code> </band></code></p> <p><code></detail></code></p> The full report design can be downloaded from <a href="the-pilot-report.jrxml.html" class="wikiLink">the-pilot-report.jrxml</a>. </div> </div> <div id="footer"> This revision (2) was last Modified 2007-04-27T16:49:22 by Tetyana. </div> </body> </html>