jasperreports-server-ce/samples/reports/chartSamples.jrxml

298 lines
12 KiB
XML
Executable File

<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright © 2005 - 2018 TIBCO Software Inc.
~ http://www.jaspersoft.com.
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU Affero General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU Affero General Public License for more details.
~
~ You should have received a copy of the GNU Affero General Public License
~ along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
<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="chartSamples" pageWidth="595" pageHeight="842" columnWidth="535" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20">
<property name="ireport.scriptlethandling" value="0"/>
<property name="ireport.encoding" value="UTF-8"/>
<import value="net.sf.jasperreports.engine.*"/>
<import value="java.util.*"/>
<import value="net.sf.jasperreports.engine.data.*"/>
<queryString>
<![CDATA[select id, account_name, account_type, industry
from sales_account;]]>
</queryString>
<field name="id" class="java.lang.Integer"/>
<field name="account_name" class="java.lang.String"/>
<field name="account_type" class="java.lang.String"/>
<field name="industry" class="java.lang.String"/>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="24" splitType="Stretch">
<staticText>
<reportElement key="staticText-1" x="0" y="0" width="404" height="14" forecolor="#999999"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement/>
<text><![CDATA[Section detail: title]]></text>
</staticText>
</band>
</title>
<pageHeader>
<band height="294" splitType="Stretch">
<pieChart>
<chart evaluationTime="Report">
<reportElement key="element-1" x="12" y="24" width="511" height="259"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<chartTitle/>
<chartSubtitle/>
<chartLegend/>
</chart>
<pieDataset>
<keyExpression><![CDATA[$F{industry}]]></keyExpression>
<valueExpression><![CDATA[$F{id}]]></valueExpression>
<labelExpression><![CDATA[$F{industry}]]></labelExpression>
</pieDataset>
<piePlot isCircular="true">
<plot/>
<itemLabel color="#000000" backgroundColor="#FFFFFF"/>
</piePlot>
</pieChart>
<staticText>
<reportElement key="staticText-2" x="0" y="0" width="404" height="14" forecolor="#999999"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement/>
<text><![CDATA[Section detail: page header]]></text>
</staticText>
</band>
</pageHeader>
<columnHeader>
<band height="34" splitType="Stretch">
<staticText>
<reportElement key="staticText-3" x="0" y="0" width="404" height="14" forecolor="#999999"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement/>
<text><![CDATA[Section detail: column header]]></text>
</staticText>
</band>
</columnHeader>
<detail>
<band height="51" splitType="Stretch">
<textField isBlankWhenNull="false">
<reportElement key="textField-1" x="6" y="23" width="42" height="20"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement/>
<textFieldExpression class="java.lang.Integer"><![CDATA[$F{id}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="false">
<reportElement key="textField-2" x="65" y="23" width="209" height="20"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{account_name}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="false">
<reportElement key="textField-3" x="291" y="23" width="92" height="20"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{account_type}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="false">
<reportElement key="textField-4" x="400" y="23" width="130" height="20"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{industry}]]></textFieldExpression>
</textField>
<staticText>
<reportElement key="staticText-4" x="0" y="0" width="404" height="14" forecolor="#999999"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement/>
<text><![CDATA[Section detail: detail]]></text>
</staticText>
</band>
</detail>
<columnFooter>
<band height="26" splitType="Stretch">
<staticText>
<reportElement key="staticText-5" x="0" y="0" width="404" height="14" forecolor="#999999"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement/>
<text><![CDATA[Section detail: column footer]]></text>
</staticText>
</band>
</columnFooter>
<pageFooter>
<band height="203" splitType="Stretch">
<staticText>
<reportElement key="staticText-6" x="0" y="0" width="404" height="14" forecolor="#999999"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement/>
<text><![CDATA[Section detail: page footer]]></text>
</staticText>
<stackedBarChart>
<chart evaluationTime="Report">
<reportElement key="element-2" x="17" y="23" width="242" height="169"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<chartTitle/>
<chartSubtitle/>
<chartLegend/>
</chart>
<categoryDataset>
<categorySeries>
<seriesExpression><![CDATA[$F{industry}]]></seriesExpression>
<categoryExpression><![CDATA[$F{account_type}]]></categoryExpression>
<valueExpression><![CDATA[$F{id}]]></valueExpression>
</categorySeries>
</categoryDataset>
<barPlot>
<plot/>
<itemLabel color="#000000" backgroundColor="#FFFFFF"/>
<categoryAxisFormat>
<axisFormat>
<labelFont/>
<tickLabelFont/>
</axisFormat>
</categoryAxisFormat>
<valueAxisFormat>
<axisFormat>
<labelFont/>
<tickLabelFont/>
</axisFormat>
</valueAxisFormat>
</barPlot>
</stackedBarChart>
<areaChart>
<chart evaluationTime="Report">
<reportElement key="element-3" x="281" y="22" width="242" height="169"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<chartTitle/>
<chartSubtitle/>
<chartLegend/>
</chart>
<categoryDataset>
<categorySeries>
<seriesExpression><![CDATA[$F{industry}]]></seriesExpression>
<categoryExpression><![CDATA[$F{account_type}]]></categoryExpression>
<valueExpression><![CDATA[$F{id}]]></valueExpression>
</categorySeries>
</categoryDataset>
<areaPlot>
<plot/>
<categoryAxisFormat>
<axisFormat>
<labelFont/>
<tickLabelFont/>
</axisFormat>
</categoryAxisFormat>
<valueAxisFormat>
<axisFormat>
<labelFont/>
<tickLabelFont/>
</axisFormat>
</valueAxisFormat>
</areaPlot>
</areaChart>
</band>
</pageFooter>
<lastPageFooter>
<band height="26" splitType="Stretch">
<staticText>
<reportElement key="staticText-7" x="0" y="0" width="404" height="14" forecolor="#999999"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement/>
<text><![CDATA[Section detail: last page footer]]></text>
</staticText>
</band>
</lastPageFooter>
<summary>
<band height="23" splitType="Stretch">
<staticText>
<reportElement key="staticText-8" x="0" y="0" width="404" height="14" forecolor="#999999"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement/>
<text><![CDATA[Section detail: summary]]></text>
</staticText>
</band>
</summary>
</jasperReport>