<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE report PUBLIC "-//JFreeReport//DTD report definition//EN//simple/version 0.8.5" "http://jfreereport.sourceforge.net/report-085.dtd"> <report bottommargin="36" leftmargin="36" name="Sales Report" pageformat="LETTER" rightmargin="36" topmargin="36" orientation="portrait"> <parser-config> <property name="Group_by">LASTNAME</property> <property name="Amount">SOLD_PRICE</property> <property name="steel-wheels-location">/ViewAction?solution=samples&path=steel-wheels/reports&</property> </parser-config> <configuration> <property name="org.jfree.report.modules.output.pageable.pdf.Encoding">iso-8859-15</property> </configuration> <reportheader fontname="SanSerif"> </reportheader> <reportfooter> <drawable-field x="0%" y="18" width="600" height="300" fieldname="PieChart"/> <!-- <imageurl-field x="0%" y="9" fieldname="BarChart" width="100%" height="600"/> --> </reportfooter> <pageheader fontname="SanSerif" fontsize="8" fontstyle="plain"> <band x="0" y="0"> <line color="#5C7485" weight="2" width="100%" x1="0%" x2="100%" y1="0" y2="0"/> <line color="#5C7485" weight=".5" width="100%" x1="0%" x2="100%" y1="3" y2="3"/> <band x="0" y="9"> <message-field vertical-alignment="middle" alignment="right" height="14" width="50%" x="50%" y="0">Steel Wheels, Inc.</message-field> <message-field vertical-alignment="middle" alignment="right" height="14" width="50%" x="50%" y="14">Summary of Sales by Employee</message-field> <message-field vertical-alignment="middle" alignment="right" height="14" width="50%" x="50%" y="28">From $(time_start) through $(time_stop)</message-field> </band> <!-- message-field vertical-alignment="middle" alignment="left" height="10" width="33%" x="0%" y="16">$(username)</message-field --> <imageref src="${serverBaseURL}/sw-style/active/sw_logo.jpg" width="50%" height="40" keepAspectRatio="true" scale="true" x="0%" y="14"/> <line color="white" weight=".5" x1="0%" x2="100%" y1="56" y2="56"/> <line color="#5C7485" weight=".5" x1="0%" x2="100%" y1="57" y2="57"/> <line color="#5C7485" weight="2" width="100%" x1="0%" x2="100%" y1="60" y2="60"/> <rectangle color="white" fill="false" height="9" width="100%" x="0" y="61"/> </band> <!-- <imageref src="${serverBaseURL}/pentaho/images/sw_text_rgb.jpg" width="40%" height="25" keepAspectRatio="true" scale="true" alignment="center" x="30%" /> <label height="12" width="100%" y="30" color="#C90404" alignment="center">Customer Sales Summary</label> <label height="12" width="100%" y="45" color="#C90404" alignment="center">Year to Date 2005</label> --> </pageheader> <pagefooter fontname="SanSerif"> <message-field alignment="center" fontname="Arial" fontsize="8" height="10" width="20%" x="40%">$(PageofPages)</message-field> <message-field height="10" width="40%" alignment="left" fontname="Arial" fontsize="8">Confidential Material</message-field> <label alignment="right" height="10" href="http://www.pentaho.org" width="50%" x="50%" y="15">Pentaho Sample Report</label> <message-field height="10" width="50%" y="15">Report Run: $(report.date)</message-field> </pagefooter> <groups> <group name="dummy group"> <groupheader fontname="SanSerif"> <band x="0" y="0"> <rectangle color="#5C7485" draw="false" fill="true" height="15" width="100%" x="0" y="0"/> <message-field height="15" width="79%" x="1%" color="white" alignment="left" y="0" vertical-alignment="middle" nullstring="">$(territory_name) - $(productline_name) - $(employee_name) - $(product_name)</message-field> <label height="15" width="15%" x="80%" y="0" color="white" alignment="right" vertical-alignment="middle">Sales ($)</label> <label height="15" width="5%" x="95%" alignment="left" vertical-alignment="middle" ></label> </band> </groupheader> <groupfooter pagebreak-after-print="false"> <line x2="95%" x1="80%" y2="6" y1="6" weight=".75" width="15%" color="black" height="1"/> <rectangle color="#FFC607" draw="false" fill="true" height="15" width="100%" x="0" y="7"/> <message-field vertical-alignment="middle" fontname="Arial" fontsize="10" fontstyle="bold" height="15" width="50%" x="1%" y="7">Total </message-field> <number-field vertical-alignment="middle" height="15" width="15%" fieldname="totalsales" format="$ #,###" fontsize="10" fontname="Arial" fontstyle="bold" x="80%" y="7" alignment="right" /> <label height="15" width="5%" x="95%" alignment="left" vertical-alignment="middle" y="7"></label> <line x2="95%" x1="80%" y2="23" y1="23" weight=".5" color="black"/> <line x2="95%" x1="80%" y2="25" y1="25" weight=".5" color="black"/> </groupfooter> </group> </groups> <items fontname="SanSerif" fontsize="9" fontstyle="plain" layout-cachable="false" visible="true"> <rectangle name="background" x="5%" y="0" width="95%" height="15" color="#DFDFDF"/> <string-field height="15" width="35%" fieldname="${Group_by}" x="5%" alignment="left" vertical-alignment="middle"></string-field> <label name="ProductLink" color="#5C7485" fontsize="7" height="15" width="15%" x="40%" alignment="center" vertical-alignment="middle" ></label> <label name="EmployeeLink" color="#5C7485" fontsize="7" height="15" width="15%" x="55%" alignment="center" vertical-alignment="middle" ></label> <label height="15" width="5%" x="70%" alignment="left" vertical-alignment="middle" ></label> <number-field height="15" width="15%" fieldname="${Amount}" x="80%" alignment="right" format="#,###" vertical-alignment="middle"></number-field> <label height="15" width="5%" x="95%" alignment="left" vertical-alignment="middle" ></label> </items> <functions> <function name="backgroundTrigger" class="org.jfree.report.function.ElementVisibilitySwitchFunction"> <properties> <property name="element">background</property> <property name="numberOfElements">1</property> </properties> </function> <property-ref name="report.date"/> <property-ref name="territory_name"/> <property-ref name="employee_name"/> <property-ref name="product_name"/> <property-ref name="productline_name"/> <property-ref name="territory"/> <property-ref name="employee"/> <property-ref name="product"/> <property-ref name="productline"/> <property-ref name="time_start"/> <property-ref name="time_stop"/> <property-ref name="output-type"/> <function class="org.jfree.report.function.PageOfPagesFunction" name="PageofPages"/> <expression class="org.jfree.report.function.TextFormatExpression" name="DrilltoProduct"> <properties> <property name="pattern">${pentahoBaseURL}${steel-wheels-location}action=Sales_by_Product.xaction&employee={0}&territory={2}&productline={1}&time_start={3}&time_stop={4}</property> <property name="field[0]">${Group_by}</property> <property name="field[1]">productline</property> <property name="field[2]">territory</property> <property name="field[3]">time_start</property> <property name="field[4]">time_stop</property> <property name="urlEncodeValues">true</property> </properties> </expression> <function class="org.jfree.report.function.CreateHyperLinksFunction" name="AddProductHRef"> <properties> <property name="field">DrilltoProduct</property> <property name="element">ProductLink</property> </properties> </function> <function name="totalsales" class="org.jfree.report.function.TotalGroupSumFunction"> <properties> <property name="field">${Amount}</property> </properties> </function> <!-- This makes sure, that we can access the parameter as if it was a column from the table --> <property-ref name="${Group_by}"/> <property-ref name="${Amount}"/> <property-ref name="territory"/> <property-ref name="productline"/> <expression class="org.pentaho.plugin.jfreereport.reportcharts.PieSetCollectorFunction" name="chartDataSource"> <properties> <property name="seriesColumn">${Group_by}</property> <property name="valueColumn">${Amount}</property> <property name="summaryOnly">false</property> </properties> </expression> <expression class="org.pentaho.plugin.jfreereport.reportcharts.PieChartExpression" name="PieChart"> <properties> <property name="title">Sales by ${Group_by}</property> <property name="titleFont">Arial-BOLD-14</property> <property name="labelFont">Arial--6</property> <property name="legendFont">Arial--6</property> <property name="backgroundColor">#C8D0D5</property> <property name="showBorder">false</property> <property name="dataSource">chartDataSource</property> <property name="legendLocation">BOTTOM</property> <property name="showLegend">true</property> <property name="chartWidth">600</property> <property name="chartHeight">300</property> <property name="useDrawable">true</property> <property name="ignoreNulls">true</property> <property name="ignoreZeros">true</property> <property name="pieLabelFormat">{0} {2}</property> <property name="pieLegendLabelFormat">{0} [$ {1}]</property> <property name="explodeSegment">maxValue</property> <property name="explodePct">.20</property> </properties> </expression> </functions> </report>