mps-platform/cds-platform-2025.V1/report/reTemplate/sample_report1.jrxml

99 lines
3.7 KiB
XML

<?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="SampleReport"
pageWidth="595"
pageHeight="842"
columnWidth="555"
leftMargin="20"
rightMargin="20"
topMargin="20"
bottomMargin="20">
<!-- 1. 全局默认字体设置 -->
<property name="net.sf.jasperreports.default.font.name" value="思源宋体"/>
<property name="net.sf.jasperreports.default.pdf.font.name" value="STSong-Light"/>
<property name="net.sf.jasperreports.default.pdf.encoding" value="UniGB-UCS2-H"/>
<property name="net.sf.jasperreports.default.pdf.embedded" value="true"/>
<!-- 参数定义 -->
<parameter name="ReportTitle" class="java.lang.String"/>
<!-- 字段定义 -->
<field name="reportName" class="java.lang.String"/>
<field name="templatePath" class="java.lang.String"/>
<!-- 标题区(仅首页显示) -->
<title>
<band height="50">
<staticText>
<reportElement x="0" y="0" width="550" height="30"/>
<text><![CDATA[测试报表]]></text>
</staticText>
</band>
</title>
<!-- 列头区(每页显示) -->
<columnHeader>
<band height="20">
<staticText>
<reportElement x="200" y="0" width="100" height="20"/>
<text><![CDATA[id]]></text>
</staticText>
<staticText>
<reportElement x="0" y="0" width="200" height="20"/>
<text><![CDATA[name]]></text>
</staticText>
<staticText>
<reportElement x="200" y="0" width="100" height="20"/>
<text><![CDATA[path]]></text>
</staticText>
<staticText>
<reportElement x="200" y="0" width="100" height="20"/>
<text><![CDATA[create_dept]]></text>
</staticText>
<staticText>
<reportElement x="200" y="0" width="100" height="20"/>
<text><![CDATA[create_time]]></text>
</staticText>
</band>
</columnHeader>
<!-- 数据区(每条记录显示) -->
<detail>
<band height="20">
<textField>
<reportElement x="0" y="0" width="200" height="20"/>
<textFieldExpression><![CDATA[$F{reportName}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="200" y="0" width="100" height="20"/>
<textFieldExpression><![CDATA[$F{templatePath}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="200" y="0" width="100" height="20"/>
<textFieldExpression><![CDATA[$F{createDept}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="200" y="0" width="100" height="20"/>
<textFieldExpression><![CDATA[$F{createTime}]]></textFieldExpression>
</textField>
</band>
</detail>
<!-- 页脚区(每页显示) -->
<pageFooter>
<band height="20">
<textField evaluationTime="Now">
<reportElement x="400" y="0" width="150" height="20"/>
<textFieldExpression><![CDATA["Page " + $V{PAGE_NUMBER} + " of " + $V{PAGE_COUNT}]]></textFieldExpression>
</textField>
</band>
</pageFooter>
</jasperReport>