我是 JasperReports 的新手。
我正在使用 iReport 5.1.0 而我正在尝试从表中获取数据,当我尝试获取某些列但是当我尝试获取整个列时列(完整表)当我在设计中查看时它不会生成预览,我去了编辑器并检查执行查询时出错
Error:net.sf.jasperreports.engine.JRException:Error Executing SQL Statement:data
我的模板:
<?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="test5" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="c0460b6f-54ff-4c1b-8166-849444c39ebc">
<queryString>
<![CDATA[SELECT
academicperiod_ape.`id_ape` AS academicperiod_ape_id_ape,
academicperiod_ape.`idacy_ape` AS academicperiod_ape_idacy_ape,
academicperiod_ape.`name_ape` AS academicperiod_ape_name_ape,
academicperiod_ape.`shortname_ape` AS academicperiod_ape_shortname_ape,
academicperiod_ape.`countable_ape` AS academicperiod_ape_countable_ape,
academicperiod_ape.`order_ape` AS academicperiod_ape_order_ape,
academicperiod_ape.`is_active_ape` AS academicperiod_ape_is_active_ape,
academicperiod_ape.`is_deleted_ape` AS academicperiod_ape_is_deleted_ape,
academicperiod_ape.`log_date_created_ape` AS academicperiod_ape_log_date_created_ape,
academicperiod_ape.`log_idpsn_ape` AS academicperiod_ape_log_idpsn_ape
FROM
`academicperiod_ape` academicperiod_ape]]>
</queryString>
<field name="academicperiod_ape_shortname_ape" class="java.lang.String"/>
<field name="academicperiod_ape_is_deleted_ape" class="java.lang.Integer"/>
<field name="academicperiod_ape_is_active_ape" class="java.lang.Integer"/>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="79" splitType="Stretch"/>
</title>
<pageHeader>
<band height="35" splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band height="77" splitType="Stretch">
<staticText>
<reportElement uuid="d6f6f737-d03c-4098-b855-eaaabbec26dc" x="14" y="41" width="100" height="20"/>
<textElement/>
<text><![CDATA[academicperiod_ape_shortname_ape]]></text>
</staticText>
<staticText>
<reportElement uuid="1c2aecca-818c-40d8-ac0f-b82f813ef121" x="138" y="41" width="100" height="20"/>
<textElement/>
<text><![CDATA[academicperiod_ape_is_deleted_ape]]></text>
</staticText>
<staticText>
<reportElement uuid="ef5d3dc3-ac4b-479b-b423-ec007af4063d" x="255" y="41" width="100" height="20"/>
<textElement/>
<text><![CDATA[academicperiod_ape_is_active_ape]]></text>
</staticText>
</band>
</columnHeader>
<detail>
<band height="125" splitType="Stretch">
<textField>
<reportElement uuid="543cb201-2468-4006-935d-ae57592d8a12" x="14" y="18" width="100" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$F{academicperiod_ape_shortname_ape}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="e7a93748-c368-4b0c-a360-87c24536d49d" x="138" y="18" width="100" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$F{academicperiod_ape_is_deleted_ape}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="696bc20f-b99a-423e-ba7d-2b59f7f14ceb" x="255" y="18" width="100" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$F{academicperiod_ape_is_active_ape}]]></textFieldExpression>
</textField>
<line>
<reportElement uuid="cc1d1c52-bcb5-483e-94ff-0d43b35a9ab4" x="123" y="0" width="1" height="125"/>
</line>
<line>
<reportElement uuid="5a2cf9f5-6070-49ce-afc8-dc189a64b20e" x="0" y="0" width="100" height="1"/>
</line>
</band>
</detail>
<columnFooter>
<band height="45" splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band height="54" splitType="Stretch"/>
</pageFooter>
<summary>
<band height="42" splitType="Stretch"/>
</summary>
</jasperReport>
任何形式的帮助都会让你的朋友感激不尽。