作者: luckiejacky 時間: 2013-10-16 07:19 標題: [Jasper report] details 得一條row
- <?xml version="1.0" encoding="UTF-8"?>
- <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="MonthlyMemberTotalSales" pageWidth="792" pageHeight="612" orientation="Landscape" columnWidth="752" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="3acf8789-25fe-40e8-8db6-634fee41dc65">
- <property name="ireport.zoom" value="1.0"/>
- <property name="ireport.x" value="0"/>
- <property name="ireport.y" value="0"/>
- <subDataset name="ChartDataSet" uuid="8108e26f-b11d-4ba4-a27f-48af25a186d9">
- <field name="type" class="java.lang.String"/>
- <field name="month" class="java.lang.Integer"/>
- <field name="percent" class="java.lang.Double"/>
- <field name="sales" class="java.lang.Integer"/>
- <field name="total" class="java.lang.Integer"/>
- </subDataset>
- <field name="type" class="java.lang.String"/>
- <field name="month" class="java.lang.Integer"/>
- <field name="sales" class="java.lang.Integer"/>
- <field name="total" class="java.lang.Integer"/>
- <field name="percent" class="java.lang.Double"/>
- <field name="listOfSales" class="java.util.List"/>
- <background>
- <band splitType="Stretch"/>
- </background>
- <title>
- <band height="79" splitType="Stretch">
- <staticText>
- <reportElement uuid="1dcb5f2b-a4df-450c-96b2-d6030e9b4a33" mode="Opaque" x="0" y="0" width="752" height="79" backcolor="#FFFF00"/>
- <textElement textAlignment="Center">
- <font size="48" isUnderline="false"/>
- </textElement>
- <text><![CDATA[Monthly Sales Report]]></text>
- </staticText>
- </band>
- </title>
- <pageHeader>
- <band height="35" splitType="Stretch"/>
- </pageHeader>
- <columnHeader>
- <band height="30" splitType="Stretch">
- <staticText>
- <reportElement uuid="cbc4f3a4-dde4-4535-a4da-42ae2396a394" x="0" y="0" width="100" height="20"/>
- <textElement/>
- <text><![CDATA[type]]></text>
- </staticText>
- <staticText>
- <reportElement uuid="eb7f73ac-ef4b-42c7-af83-c220cb90e7e2" x="100" y="0" width="100" height="20"/>
- <textElement/>
- <text><![CDATA[month]]></text>
- </staticText>
- <staticText>
- <reportElement uuid="140e982e-1a40-4fd9-8b90-04f5ffcf6b48" x="200" y="0" width="100" height="20"/>
- <textElement/>
- <text><![CDATA[sales]]></text>
- </staticText>
- <staticText>
- <reportElement uuid="00024fb5-6d2b-4352-9965-d972097ad16d" x="300" y="0" width="100" height="20"/>
- <textElement/>
- <text><![CDATA[percent]]></text>
- </staticText>
- </band>
- </columnHeader>
- <detail>
- <band height="125" splitType="Stretch">
- <textField>
- <reportElement uuid="f953968e-1da4-4312-9dd0-c89356b2cfd1" x="0" y="0" width="100" height="20"/>
- <textElement/>
- <textFieldExpression><![CDATA[$F{type}]]></textFieldExpression>
- </textField>
- <textField>
- <reportElement uuid="194c193f-1c98-4f6a-a27e-df8620eb9621" x="100" y="0" width="100" height="20"/>
- <textElement/>
- <textFieldExpression><![CDATA[$F{month}]]></textFieldExpression>
- </textField>
- <textField>
- <reportElement uuid="67cb8451-eb97-447d-9eb3-c3bc1026f135" x="200" y="0" width="100" height="20"/>
- <textElement/>
- <textFieldExpression><![CDATA[$F{sales}]]></textFieldExpression>
- </textField>
- <textField>
- <reportElement uuid="570c2d09-90ca-4313-b3f8-84f797d4fc5a" x="300" y="0" width="100" height="20"/>
- <textElement/>
- <textFieldExpression><![CDATA[$F{percent}]]></textFieldExpression>
- </textField>
- </band>
- </detail>
- <columnFooter>
- <band height="137" splitType="Stretch">
- <stackedBarChart>
- <chart>
- <reportElement uuid="74539c29-04d5-4692-92cd-a400279861d8" x="0" y="0" width="752" height="137"/>
- <chartTitle/>
- <chartSubtitle/>
- <chartLegend/>
- </chart>
- <categoryDataset>
- <dataset>
- <datasetRun subDataset="ChartDataSet" uuid="39f7f3ab-8979-45ec-af7d-997d6010adce">
- <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{listOfSales})]]></dataSourceExpression>
- </datasetRun>
- </dataset>
- <categorySeries>
- <seriesExpression><![CDATA[$F{type}]]></seriesExpression>
- <categoryExpression><![CDATA[$F{month}]]></categoryExpression>
- <valueExpression><![CDATA[$F{sales}]]></valueExpression>
- </categorySeries>
- </categoryDataset>
- <barPlot>
- <plot/>
- <itemLabel/>
- </barPlot>
- </stackedBarChart>
- </band>
- </columnFooter>
- <pageFooter>
- <band height="54" splitType="Stretch"/>
- </pageFooter>
- <summary>
- <band height="42" splitType="Stretch"/>
- </summary>
- </jasperReport>
type:"VIP"
month:10
percent:0.0
sales:0.0
total:0.0
listOfSales: has the same data
這條有show出來
type:"Normal"
month:10
percent:0.0
sales:0.0
total:0.0
listOfSales: has the same data
這個沒有....
為什麼呢?
THX
