java - 出现错误 : "Unknown property ' ' on class MyBean"? 的原因是什么

标签 java jasper-reports javabeans

我已将 DS 添加到我的报告中,但出现错误

why in error 没有发生错误的字段 我不能在 .jrxml 中规定任何内容

17:01:38,172 ERROR [stderr] (http-/0.0.0.0:7051-1) net.sf.jasperreports.engine.JRException: Error retrieving field value from bean : 
17:01:38,172 ERROR [stderr] (http-/0.0.0.0:7051-1)  at net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.getBeanProperty(JRAbstractBeanDataSource.java:123)
17:01:38,172 ERROR [stderr] (http-/0.0.0.0:7051-1)  at net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.getFieldValue(JRAbstractBeanDataSource.java:96)
17:01:38,172 ERROR [stderr] (http-/0.0.0.0:7051-1)  at net.sf.jasperreports.engine.data.JRBeanCollectionDataSource.getFieldValue(JRBeanCollectionDataSource.java:100)
17:01:38,172 ERROR [stderr] (http-/0.0.0.0:7051-1)  at net.sf.jasperreports.engine.fill.JRFillDataset.setOldValues(JRFillDataset.java:1330)
17:01:38,172 ERROR [stderr] (http-/0.0.0.0:7051-1)  at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:1231)
17:01:38,172 ERROR [stderr] (http-/0.0.0.0:7051-1)  at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:1207)
17:01:38,172 ERROR [stderr] (http-/0.0.0.0:7051-1)  at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:1554)
17:01:38,172 ERROR [stderr] (http-/0.0.0.0:7051-1)  at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:149)
17:01:38,172 ERROR [stderr] (http-/0.0.0.0:7051-1)  at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:909)
17:01:38,172 ERROR [stderr] (http-/0.0.0.0:7051-1)  at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:841)
17:01:38,172 ERROR [stderr] (http-/0.0.0.0:7051-1)  at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:88)
17:01:38,172 ERROR [stderr] (http-/0.0.0.0:7051-1)  at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:653)
17:01:38,172 ERROR [stderr] (http-/0.0.0.0:7051-1)  at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:569)
17:01:38,172 ERROR [stderr] (http-/0.0.0.0:7051-1)  at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:915)
17:01:38,173 ERROR [stderr] (http-/0.0.0.0:7051-1)  at by.softclub.abank.admin.ui.reports.ReportBuilder.dataOutFromBeans(ReportBuilder.java:163)
17:01:38,173 ERROR [stderr] (http-/0.0.0.0:7051-1)  at by.softclub.abank.admin.ui.reports.ReportBuilder.addByteDataToReport(ReportBuilder.java:65)
17:01:38,173 ERROR [stderr] (http-/0.0.0.0:7051-1)  at by.softclub.abank.admin.ui.page.AbstractBasePage.getbuildReport(AbstractBasePage.java:197)
17:01:38,173 ERROR [stderr] (http-/0.0.0.0:7051-1)  at by.softclub.abank.admin.ui.page.AbstractBasePage.printReport(AbstractBasePage.java:170)
17:01:38,173 ERROR [stderr] (http-/0.0.0.0:7051-1)  at by.softclub.abank.admin.ui.page.UserInfoStatisticPage.printActiveUsersReport(UserInfoStatisticPage.java:152)
17:01:38,173 ERROR [stderr] (http-/0.0.0.0:7051-1)  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
17:01:38,173 ERROR [stderr] (http-/0.0.0.0:7051-1)  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
17:01:38,173 ERROR [stderr] (http-/0.0.0.0:7051-1)  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
17:01:38,173 ERROR [stderr] (http-/0.0.0.0:7051-1)  at java.lang.reflect.Method.invoke(Method.java:597)
17:01:38,173 ERROR [stderr] (http-/0.0.0.0:7051-1)  at org.apache.el.parser.AstValue.invoke(AstValue.java:258)
17:01:38,173 ERROR [stderr] (http-/0.0.0.0:7051-1)  at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278)
17:01:38,173 ERROR [stderr] (http-/0.0.0.0:7051-1)  at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
17:01:38,173 ERROR [stderr] (http-/0.0.0.0:7051-1)  at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:87)
17:01:38,173 ERROR [stderr] (http-/0.0.0.0:7051-1)  at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
17:01:38,173 ERROR [stderr] (http-/0.0.0.0:7051-1)  at org.primefaces.application.DialogActionListener.processAction(DialogActionListener.java:45)
17:01:38,175 ERROR [stderr] (http-/0.0.0.0:7051-1)  at javax.faces.component.UICommand.broadcast(UICommand.java:315)
17:01:38,175 ERROR [stderr] (http-/0.0.0.0:7051-1)  at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790)
17:01:38,175 ERROR [stderr] (http-/0.0.0.0:7051-1)  at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282)
17:01:38,175 ERROR [stderr] (http-/0.0.0.0:7051-1)  at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
17:01:38,175 ERROR [stderr] (http-/0.0.0.0:7051-1)  at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
17:01:38,175 ERROR [stderr] (http-/0.0.0.0:7051-1)  at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
17:01:38,175 ERROR [stderr] (http-/0.0.0.0:7051-1)  at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
17:01:38,175 ERROR [stderr] (http-/0.0.0.0:7051-1)  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)
17:01:38,175 ERROR [stderr] (http-/0.0.0.0:7051-1)  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
17:01:38,175 ERROR [stderr] (http-/0.0.0.0:7051-1)  at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:98)
17:01:38,175 ERROR [stderr] (http-/0.0.0.0:7051-1)  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
17:01:38,175 ERROR [stderr] (http-/0.0.0.0:7051-1)  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
17:01:38,175 ERROR [stderr] (http-/0.0.0.0:7051-1)  at by.softclub.abank.admin.ui.faces.UrlFilter.doFilter(UrlFilter.java:118)
17:01:38,175 ERROR [stderr] (http-/0.0.0.0:7051-1)  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
17:01:38,175 ERROR [stderr] (http-/0.0.0.0:7051-1)  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
17:01:38,175 ERROR [stderr] (http-/0.0.0.0:7051-1)  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
17:01:38,175 ERROR [stderr] (http-/0.0.0.0:7051-1)  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149)
17:01:38,175 ERROR [stderr] (http-/0.0.0.0:7051-1)  at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)
17:01:38,175 ERROR [stderr] (http-/0.0.0.0:7051-1)  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145)
17:01:38,175 ERROR [stderr] (http-/0.0.0.0:7051-1)  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
17:01:38,176 ERROR [stderr] (http-/0.0.0.0:7051-1)  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)
17:01:38,176 ERROR [stderr] (http-/0.0.0.0:7051-1)  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336)
17:01:38,176 ERROR [stderr] (http-/0.0.0.0:7051-1)  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
17:01:38,176 ERROR [stderr] (http-/0.0.0.0:7051-1)  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
17:01:38,176 ERROR [stderr] (http-/0.0.0.0:7051-1)  at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920)
17:01:38,176 ERROR [stderr] (http-/0.0.0.0:7051-1)  at java.lang.Thread.run(Thread.java:662)
17:01:38,176 ERROR [stderr] (http-/0.0.0.0:7051-1) Caused by: java.lang.NoSuchMethodException: Unknown property '' on class 'class by.softclub.common.entity.UserBPSWrapper'
17:01:38,176 ERROR [stderr] (http-/0.0.0.0:7051-1)  at org.apache.commons.beanutils.PropertyUtilsBean.getSimpleProperty(PropertyUtilsBean.java:1322)
17:01:38,176 ERROR [stderr] (http-/0.0.0.0:7051-1)  at org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:770)
17:01:38,176 ERROR [stderr] (http-/0.0.0.0:7051-1)  at org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:846)
17:01:38,176 ERROR [stderr] (http-/0.0.0.0:7051-1)  at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:426)
17:01:38,176 ERROR [stderr] (http-/0.0.0.0:7051-1)  at net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.getBeanProperty(JRAbstractBeanDataSource.java:111)
17:01:38,176 ERROR [stderr] (http-/0.0.0.0:7051-1)  ... 54 more

所以我的 bean

public class UserBPSWrapper implements Serializable, IWrapper {

    private String id;
    private String numberSubdivision;
    private String fioAdmin;
    private Date dateReg;
    private String fioClient;
    private String numberPhone;
    private String numberPassport;
    private Date dateRegClient;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getNumberSubdivision() {
        return numberSubdivision;
    }

    public void setNumberSubdivision(String numberSubdivision) {
        this.numberSubdivision = numberSubdivision;
    }

    public String getFioAdmin() {
        return fioAdmin;
    }

    public void setFioAdmin(String fioAdmin) {
        this.fioAdmin = fioAdmin;
    }

    public Date getDateReg() {
        return dateReg;
    }

    public void setDateReg(Date dateReg) {
        this.dateReg = dateReg;
    }

    public String getFioClient() {
        return fioClient;
    }

    public void setFioClient(String fioClient) {
        this.fioClient = fioClient;
    }

    public String getNumberPhone() {
        return numberPhone;
    }

    public void setNumberPhone(String numberPhone) {
        this.numberPhone = numberPhone;
    }

    public String getNumberPassport() {
        return numberPassport;
    }

    public void setNumberPassport(String numberPassport) {
        this.numberPassport = numberPassport;
    }

    public Date getDateRegClient() {
        return dateRegClient;
    }

    public void setDateRegClient(Date dateRegClient) {
        this.dateRegClient = dateRegClient;
    }
}

我打电话报告

JRDataSource dataSource = createReportDataSource(reportRows);
String jasperReportName = newPath + templateXML + ".jasper";

jasperPrint = JasperFillManager.fillReport(jasperReportName, reportParametersMap, dataSource);

private JRDataSource createReportDataSource(Collection reportRows) {
    JRDataSource dataSource;

    if (reportRows == null || reportRows.size() == 0) {
        dataSource = new JREmptyDataSource();
    } else {
        dataSource = new JRBeanCollectionDataSource(reportRows);
    }
    return dataSource;
}
setListToReportDetails((List<UserBPSWrapper>) dataBPSModel.getWrappedData());

我的 JRXML

<?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="Subdevelopers" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="bfa8e4d4-05e1-4c4c-85de-9feb417ff0eb">
    <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
    <parameter name="subdivisionName" class="java.lang.String"/>
    <parameter name="dateFrom" class="java.lang.String"/>
    <parameter name="dateTo" class="java.lang.String"/>
    <parameter name="reportDate" class="java.lang.String"/>
    <parameter name="clientsCountText" class="java.lang.String"/>
    <queryString>
        <![CDATA[]]>
    </queryString>
    <field name="numberSubdivision" class="java.lang.String">
        <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <field name="fioAdmin" class="java.lang.String"/>
    <field name="dateReg" class="java.util.Date"/>
    <field name="fioClient" class="java.lang.String"/>
    <field name="numberPhone" class="java.lang.String"/>
    <field name="numberPassport" class="java.lang.String"/>
    <field name="dateRegClient" class="java.util.Date">
        <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <title>
        <band height="85" splitType="Stretch">
            <textField isStretchWithOverflow="true">
                <reportElement positionType="Float" x="0" y="0" width="380" height="14" uuid="cded2592-f09e-4c61-89d6-f5e5d143035e"/>
                <textElement markup="none">
                    <font fontName="SansSerif" size="10" isBold="false"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{subdivisionName}]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement x="0" y="14" width="90" height="14" uuid="c90da0c8-1336-4dc3-a021-f0e3ae942b2d">
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement>
                    <font fontName="SansSerif" size="10"/>
                </textElement>
                <text><![CDATA[Период отчета с:]]></text>
            </staticText>
            <textField isStretchWithOverflow="true">
                <reportElement positionType="Float" x="90" y="14" width="70" height="14" uuid="53044afe-bd20-42a6-97fb-e6b8b5e81b83"/>
                <textElement markup="none">
                    <font fontName="SansSerif" size="10" isBold="false"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{dateFrom}]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement x="160" y="14" width="20" height="14" uuid="10a6a7db-dd2a-4bb6-8f06-25a03e8bd5d9">
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement>
                    <font fontName="SansSerif" size="10"/>
                </textElement>
                <text><![CDATA[РїРѕ]]></text>
            </staticText>
            <textField isStretchWithOverflow="true">
                <reportElement positionType="Float" x="180" y="14" width="70" height="14" uuid="878bcb56-dc60-4bb5-9909-73506e8be23e"/>
                <textElement markup="none">
                    <font fontName="SansSerif" size="10" isBold="false"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{dateTo}]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement x="0" y="28" width="380" height="14" uuid="6a7930c5-5605-493f-8dc4-cf3d60f9131a">
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement>
                    <font fontName="SansSerif" size="10"/>
                </textElement>
                <text><![CDATA[Банк: ОАО "БПС-Сбребанк"]]></text>
            </staticText>
            <staticText>
                <reportElement x="0" y="42" width="180" height="14" uuid="8e29e107-6761-48f6-9ce9-3a430f2ad173">
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <text><![CDATA[Дата и время формирования отчета:]]></text>
            </staticText>
            <textField isStretchWithOverflow="true">
                <reportElement positionType="Float" x="180" y="42" width="200" height="14" uuid="c0532bd1-edbc-4d78-b126-239cdfd3b818"/>
                <textElement markup="none">
                    <font fontName="SansSerif" size="10" isBold="false"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{reportDate}]]></textFieldExpression>
            </textField>
        </band>
    </title>
    <columnHeader>
        <band height="31" splitType="Stretch">
            <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
            <rectangle>
                <reportElement x="0" y="0" width="20" height="31" uuid="fab33adb-f537-46e1-ae19-aed14e0d553a"/>
            </rectangle>
            <staticText>
                <reportElement x="0" y="0" width="20" height="30" uuid="8b0c0311-2893-404d-a5f6-759c71585b39">
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font size="8"/>
                </textElement>
                <text><![CDATA[в„–]]></text>
            </staticText>
            <rectangle>
                <reportElement x="20" y="0" width="100" height="31" uuid="4c6d0de7-16be-4584-a292-b323d1765921"/>
            </rectangle>
            <staticText>
                <reportElement x="20" y="0" width="100" height="30" uuid="90ea0ab1-7105-4ae0-8a27-74db2a3d5a88">
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font size="8"/>
                </textElement>
                <text><![CDATA[Р¤РРћ администратора]]></text>
            </staticText>
            <rectangle>
                <reportElement x="120" y="0" width="70" height="31" uuid="b7cdcd71-072e-4406-bebd-8b8f29b145f3"/>
            </rectangle>
            <staticText>
                <reportElement x="120" y="0" width="70" height="30" uuid="17cc09fb-826a-4fc3-bf1f-8f56e54cfbd3">
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font size="8"/>
                </textElement>
                <text><![CDATA[Дата регистрации]]></text>
            </staticText>
            <rectangle>
                <reportElement x="190" y="0" width="100" height="31" uuid="76f7b8c5-8418-4cb6-a7a1-17afbce4cfbf">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                </reportElement>
            </rectangle>
            <staticText>
                <reportElement x="190" y="0" width="100" height="30" uuid="9366a903-3ba0-492b-b2b9-1a5af4080975">
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font size="8"/>
                </textElement>
                <text><![CDATA[Р¤РРћ клиента]]></text>
            </staticText>
            <rectangle>
                <reportElement x="290" y="0" width="100" height="31" uuid="09f7a047-ab01-4e01-a268-5dcbcd2fae49">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                </reportElement>
            </rectangle>
            <staticText>
                <reportElement x="290" y="0" width="100" height="30" uuid="f31660cc-44c3-4646-a5e5-71a7c0935520">
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font size="8"/>
                </textElement>
                <text><![CDATA[Номер мобильного]]></text>
            </staticText>
            <rectangle>
                <reportElement x="390" y="0" width="100" height="31" uuid="ac78bb73-ac1c-49b2-ba4f-292f2453dec4">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                </reportElement>
            </rectangle>
            <staticText>
                <reportElement x="390" y="0" width="100" height="30" uuid="f76e2870-bd7a-4099-9a53-5916974b7fe2">
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font size="8"/>
                </textElement>
                <text><![CDATA[Л/Н паспорта]]></text>
            </staticText>
            <rectangle>
                <reportElement x="490" y="0" width="70" height="31" uuid="c932d60f-efe1-421d-8fbe-a66f6d09eb10"/>
            </rectangle>
            <staticText>
                <reportElement x="490" y="0" width="70" height="30" uuid="de94e44b-9faa-4835-81be-651662d3a0a3">
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font size="8"/>
                </textElement>
                <text><![CDATA[Дата регистрации клиентом]]></text>
            </staticText>
        </band>
    </columnHeader>
    <detail>
        <band height="31" splitType="Stretch">
            <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
            <rectangle>
                <reportElement x="0" y="0" width="20" height="31" uuid="944528be-a403-4ed1-8ece-6c6d40cece23"/>
            </rectangle>
            <rectangle>
                <reportElement x="20" y="0" width="100" height="31" uuid="d65b1141-6bf4-431e-996a-a56ee713e7aa"/>
            </rectangle>
            <rectangle>
                <reportElement x="120" y="0" width="70" height="31" uuid="8440dbcb-221e-452a-9188-322c0fc00bdd"/>
            </rectangle>
            <rectangle>
                <reportElement x="190" y="0" width="100" height="31" uuid="03976249-b504-4218-b151-06aa198fe1bd">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                </reportElement>
            </rectangle>
            <rectangle>
                <reportElement x="290" y="0" width="100" height="31" uuid="28dbda54-1653-4559-b5ea-fcee2fa497b2">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                </reportElement>
            </rectangle>
            <rectangle>
                <reportElement x="390" y="0" width="100" height="31" uuid="be18db82-9a46-4e54-b2d1-98f2bc66af77">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                </reportElement>
            </rectangle>
            <rectangle>
                <reportElement x="490" y="0" width="70" height="31" uuid="0c336ccd-ea62-4e10-b521-69b85599592d"/>
            </rectangle>
            <textField isStretchWithOverflow="true">
                <reportElement positionType="Float" x="0" y="0" width="20" height="30" uuid="d0d3ca75-e0ed-4605-9b35-9e25a9d61b89"/>
                <textElement verticalAlignment="Middle" markup="none">
                    <font fontName="SansSerif" size="8" isBold="false"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{numberSubdivision}]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true">
                <reportElement positionType="Float" x="20" y="0" width="100" height="30" uuid="15faac99-3883-445e-b399-80aed7b8639e"/>
                <textElement verticalAlignment="Middle" markup="none">
                    <font fontName="SansSerif" size="8" isBold="false"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{fioAdmin}]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true">
                <reportElement positionType="Float" x="120" y="0" width="70" height="30" uuid="350cccbb-0c58-4136-8306-278195115415"/>
                <textElement verticalAlignment="Middle" markup="none">
                    <font fontName="SansSerif" size="8" isBold="false"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{dateReg}]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true">
                <reportElement positionType="Float" x="190" y="0" width="100" height="30" uuid="d35bafcc-3666-4fdb-a3e3-dfd5242bc7df"/>
                <textElement verticalAlignment="Middle" markup="none">
                    <font fontName="SansSerif" size="8" isBold="false"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{fioClient}]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true">
                <reportElement positionType="Float" x="290" y="0" width="100" height="30" uuid="29f916c0-00a5-4d08-8c69-5673dbb36e59"/>
                <textElement verticalAlignment="Middle" markup="none">
                    <font fontName="SansSerif" size="8" isBold="false"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{numberPhone}]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true">
                <reportElement positionType="Float" x="390" y="0" width="100" height="30" uuid="f24050a4-70c1-4fdb-ba88-03c0ea49445c"/>
                <textElement verticalAlignment="Middle" markup="none">
                    <font fontName="SansSerif" size="8" isBold="false"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{numberPassport}]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true">
                <reportElement positionType="Float" x="490" y="0" width="70" height="30" uuid="e47a9534-4964-4208-8e0d-d6e03c65754e"/>
                <textElement verticalAlignment="Middle" markup="none">
                    <font fontName="SansSerif" size="8" isBold="false"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{dateRegClient}]]></textFieldExpression>
            </textField>
        </band>
    </detail>
    <pageFooter>
        <band height="70" splitType="Stretch">
            <textField isStretchWithOverflow="true">
                <reportElement positionType="Float" x="0" y="0" width="560" height="24" uuid="4608c8a8-f63c-4b04-8c48-9bdb0a8f085a">
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement markup="none">
                    <font fontName="SansSerif" size="10" isBold="false"/>
                    <paragraph leftIndent="240"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{clientsCountText}]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement x="0" y="0" width="240" height="14" uuid="05f5423b-164a-4754-acca-5c064adef821">
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <text><![CDATA[Количество зарегистрированных клиентов, всего:]]></text>
            </staticText>
            <staticText>
                <reportElement x="0" y="30" width="80" height="14" uuid="d90bb3fc-d0ff-44a9-ba75-bdcccd3ddf87">
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <text><![CDATA[Отчет проверил ]]></text>
            </staticText>
            <line>
                <reportElement x="80" y="44" width="100" height="1" uuid="3d0fceff-a0dd-4b79-93aa-aa5e9158ef27"/>
                <graphicElement>
                    <pen lineWidth="1.0" lineStyle="Solid"/>
                </graphicElement>
            </line>
            <staticText>
                <reportElement x="180" y="30" width="10" height="14" uuid="fe722733-55c0-4cae-b24d-5669fc15c2ba">
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <text><![CDATA[(]]></text>
            </staticText>
            <staticText>
                <reportElement x="290" y="30" width="10" height="14" uuid="3d078cf1-0d6b-4083-8652-204e1ad15f99">
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <text><![CDATA[)]]></text>
            </staticText>
            <line>
                <reportElement x="190" y="44" width="100" height="1" uuid="4a4d46de-8544-4f79-bc2b-0356e9468edf"/>
                <graphicElement>
                    <pen lineWidth="1.0" lineStyle="Solid"/>
                </graphicElement>
            </line>
        </band>
    </pageFooter>
</jasperReport>

最佳答案

报告中的 dateRegClient 字段有一个空的 fieldDescription。字段描述用于将字段映射到 bean 属性名称,由此产生错误。

删除字段描述或将其设置为 dateRegClient 应该可以消除错误。

关于java - 出现错误 : "Unknown property ' ' on class MyBean"? 的原因是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39168334/

相关文章:

jasper-reports - 我用小数代替整数

Java - 我想使用计时器绘制多个 2D 椭圆,但它不起作用

java - JAXB 编码/解码具有 List 变量成员的类对象

java - java中如何将数组作为参数?

java - 显示收集不同 bean 的报告

excel - 如何创建基于宏的模板?

java - Spring:BeanCreationException

java - 为什么 PropertyDescriptor 会返回一个以大写字母作为第一个字符的属性名称?

java - 将具有简单、索引、嵌套或组合类型属性作为键的 Hashmap 转换为 Java Bean

Java 11 没有设置 Java 环境变量