比较好用的一个jaspereport模板 生成html页面模板

<?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="groupOpenReport" pageWidth="759" pageHeight="566" orientation="Landscape" whenNoDataType="AllSectionsNoDetail" columnWidth="759" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" resourceBundle="ApplicationResources" isIgnorePagination="true">
 <property name="ireport.scriptlethandling" value="0"/>
 <property name="ireport.encoding" value="UTF-8"/>
 <import value="java.util.*"/>
 <import value="net.sf.jasperreports.engine.*"/>
 <import value="net.sf.jasperreports.engine.data.*"/>
 <field name="monthTotal" class="java.lang.String">
  <fieldDescription><![CDATA[monthTotal]]></fieldDescription>
 </field>
 <field name="addGroupTotal" class="java.lang.String">
  <fieldDescription><![CDATA[addGroupTotal]]></fieldDescription>
 </field>
 <field name="addUserTotal" class="java.lang.String">
  <fieldDescription><![CDATA[addUserTotal]]></fieldDescription>
 </field>
 <field name="groupTotal" class="java.lang.String">
  <fieldDescription><![CDATA[groupTotal]]></fieldDescription>
 </field>
 <field name="userTotal" class="java.lang.String">
  <fieldDescription><![CDATA[userTotal]]></fieldDescription>
 </field>
 <background>
  <band/>
 </background>
 <title>
  <band/>
 </title>
 <pageHeader>
  <band/>
 </pageHeader>
 <columnHeader>
  <band height="20">
   <textField isBlankWhenNull="false">
    <reportElement key="textField-1" stretchType="RelativeToBandHeight" mode="Opaque" x="0" y="0" width="138" height="20" forecolor="#165E9E" backcolor="#E2EDF6"/>
    <box>
     <pen lineWidth="0.0" lineColor="#99CCFF"/>
     <topPen lineWidth="0.25" lineColor="#99CCFF"/>
     <leftPen lineWidth="0.25" lineColor="#99CCFF"/>
     <bottomPen lineWidth="0.25" lineColor="#99CCFF"/>
     <rightPen lineWidth="0.25" lineColor="#99CCFF"/>
    </box>
    <textElement textAlignment="Center">
     <font fontName="宋体" size="12"/>
    </textElement>
    <textFieldExpression class="java.lang.String"><![CDATA[$R{adc.group.open.report.date}]]></textFieldExpression>
   </textField>
   <textField isBlankWhenNull="false">
    <reportElement key="textField-2" stretchType="RelativeToBandHeight" mode="Opaque" x="138" y="0" width="139" height="20" forecolor="#165E9E" backcolor="#E2EDF6"/>
    <box>
     <topPen lineWidth="0.75" lineColor="#99CCFF"/>
     <bottomPen lineWidth="0.25" lineColor="#99CCFF"/>
     <rightPen lineWidth="0.75" lineColor="#99CCFF"/>
    </box>
    <textElement textAlignment="Center">
     <font fontName="宋体" size="12"/>
    </textElement>
    <textFieldExpression class="java.lang.String"><![CDATA[$R{adc.group.open.report.group.total}]]></textFieldExpression>
   </textField>
   <textField isBlankWhenNull="false">
    <reportElement key="textField-3" stretchType="RelativeToBandHeight" mode="Opaque" x="277" y="0" width="163" height="20" forecolor="#165E9E" backcolor="#E2EDF6"/>
    <box>
     <pen lineWidth="0.25"/>
     <topPen lineWidth="0.25" lineColor="#99CCFF"/>
     <leftPen lineWidth="0.0"/>
     <bottomPen lineWidth="0.25" lineColor="#99CCFF"/>
     <rightPen lineWidth="0.25" lineColor="#99CCFF"/>
    </box>
    <textElement textAlignment="Center">
     <font fontName="宋体" size="12"/>
    </textElement>
    <textFieldExpression class="java.lang.String"><![CDATA[$R{adc.group.open.report.user.total}]]></textFieldExpression>
   </textField>
   <textField isStretchWithOverflow="true" isBlankWhenNull="false">
    <reportElement key="textField-4" stretchType="RelativeToBandHeight" mode="Opaque" x="440" y="0" width="164" height="20" forecolor="#165E9E" backcolor="#E2EDF6"/>
    <box>
     <topPen lineWidth="0.25" lineColor="#99CCFF"/>
     <bottomPen lineWidth="0.25" lineColor="#99CCFF"/>
     <rightPen lineWidth="0.25" lineColor="#99CCFF"/>
    </box>
    <textElement textAlignment="Center">
     <font fontName="宋体" size="12"/>
    </textElement>
    <textFieldExpression class="java.lang.String"><![CDATA[$R{adc.group.open.report.add.group.num}]]></textFieldExpression>
   </textField>
   <textField isStretchWithOverflow="true" isBlankWhenNull="false">
    <reportElement key="textField-5" stretchType="RelativeToBandHeight" mode="Opaque" x="604" y="0" width="155" height="20" forecolor="#165E9E" backcolor="#E2EDF6"/>
    <box>
     <topPen lineWidth="0.25" lineColor="#99CCFF"/>
     <bottomPen lineWidth="0.25" lineColor="#99CCFF"/>
     <rightPen lineWidth="0.25" lineColor="#99CCFF"/>
    </box>
    <textElement textAlignment="Center">
     <font fontName="宋体" size="12"/>
    </textElement>
    <textFieldExpression class="java.lang.String"><![CDATA[$R{adc.group.open.report.add.user.num}]]></textFieldExpression>
   </textField>
  </band>
 </columnHeader>
 <detail>
  <band height="20">
   <textField isBlankWhenNull="false">
    <reportElement key="textField" x="0" y="0" width="138" height="20"/>
    <box>
     <pen lineWidth="0.0" lineColor="#99CCFF"/>
     <topPen lineWidth="0.0" lineColor="#99CCFF"/>
     <leftPen lineWidth="0.25" lineColor="#99CCFF"/>
     <bottomPen lineWidth="0.25" lineColor="#99CCFF"/>
     <rightPen lineWidth="0.25" lineColor="#99CCFF"/>
    </box>
    <textElement textAlignment="Center">
     <font fontName="宋体" size="12"/>
    </textElement>
    <textFieldExpression class="java.lang.String"><![CDATA[$F{monthTotal}]]></textFieldExpression>
   </textField>
   <textField isStretchWithOverflow="true" isBlankWhenNull="false">
    <reportElement key="textField" stretchType="RelativeToBandHeight" x="440" y="0" width="164" height="20"/>
    <box>
     <bottomPen lineWidth="0.25" lineColor="#99CCFF"/>
     <rightPen lineWidth="0.25" lineColor="#99CCFF"/>
    </box>
    <textElement textAlignment="Center">
     <font fontName="宋体" size="12"/>
    </textElement>
    <textFieldExpression class="java.lang.String"><![CDATA[$F{addGroupTotal}]]></textFieldExpression>
   </textField>
   <textField isStretchWithOverflow="true" isBlankWhenNull="false">
    <reportElement key="textField" stretchType="RelativeToBandHeight" x="604" y="0" width="155" height="20"/>
    <box>
     <bottomPen lineWidth="0.25" lineColor="#99CCFF"/>
     <rightPen lineWidth="0.25" lineColor="#99CCFF"/>
    </box>
    <textElement textAlignment="Center">
     <font fontName="宋体" size="12"/>
    </textElement>
    <textFieldExpression class="java.lang.String"><![CDATA[$F{addUserTotal}]]></textFieldExpression>
   </textField>
   <textField isBlankWhenNull="false">
    <reportElement key="textField" x="138" y="0" width="139" height="20"/>
    <box>
     <bottomPen lineWidth="0.25" lineColor="#99CCFF"/>
     <rightPen lineWidth="0.25" lineColor="#99CCFF"/>
    </box>
    <textElement textAlignment="Center">
     <font fontName="宋体" size="12"/>
    </textElement>
    <textFieldExpression class="java.lang.String"><![CDATA[$F{groupTotal}]]></textFieldExpression>
   </textField>
   <textField isStretchWithOverflow="true" isBlankWhenNull="false">
    <reportElement key="textField" stretchType="RelativeToBandHeight" x="277" y="0" width="163" height="20"/>
    <box>
     <bottomPen lineWidth="0.25" lineColor="#99CCFF"/>
     <rightPen lineWidth="0.25" lineColor="#99CCFF"/>
    </box>
    <textElement textAlignment="Center">
     <font fontName="宋体" size="12"/>
    </textElement>
    <textFieldExpression class="java.lang.String"><![CDATA[$F{userTotal}]]></textFieldExpression>
   </textField>
  </band>
 </detail>
 <columnFooter>
  <band/>
 </columnFooter>
 <pageFooter>
  <band/>
 </pageFooter>
 <summary>
  <band/>
 </summary>
</jasperReport>

posted @ 2010-03-30 10:46  饺子吃遍天  阅读(148)  评论(0编辑  收藏  举报