Jump to content
We've recently updated our Privacy Statement, available here ×

exception without meaning


loge

Recommended Posts

Hi,

 

i am getting this:

 

Error with Report Creation: net.sf.jasperreports.engine.JRException: Error retrieving field value from bean :

 

Normally you would expect a property name right after the ":" but nothing. My report is quite simple, perhaps someone can point me to something. I am supplying a JRBeanCollectionDataSource to the report.

 

<?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="AswoDecInvoice" language="groovy" pageWidth="595" pageHeight="842" columnWidth="595" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0">
    <parameter name="printheader" class="java.lang.Boolean" isForPrompting="false"/>
    <queryString>
        <![CDATA[]]>
    </queryString>
    <field name="i040040" class="java.lang.Integer">
        <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <field name="i040120" class="java.lang.String">
        <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <field name="i040060n" class="java.lang.Integer">
        <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <field name="i040070n" class="java.lang.Float">
        <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <field name="i040170" class="java.lang.Float">
        <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <field name="i040140" class="java.lang.Integer">
        <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <field name="i040100" class="java.lang.String">
        <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <field name="i040080" class="java.lang.String"/>
    <field name="i040090" class="java.lang.Float"/>
    <field name="i040110n" class="java.lang.String"/>
    <variable name="TOTAL_PAGES" class="java.lang.Integer">
        <variableExpression><![CDATA[$V{PAGE_NUMBER}]]></variableExpression>
    </variable>
    <variable name="SUM_I040060N" class="java.lang.Integer" resetType="Group" resetGroup="orderId" calculation="Sum">
        <variableExpression><![CDATA[$F{i040060n}]]></variableExpression>
    </variable>
    <variable name="QU_7060N" class="java.lang.Float" resetType="Group" resetGroup="articleId" calculation="Sum">
        <variableExpression><![CDATA[$F{i040070n} / $F{i040060n}]]></variableExpression>
    </variable>
    <variable name="SUM_I040070N" class="java.lang.Float" resetType="Group" resetGroup="articleId" calculation="Sum">
        <variableExpression><![CDATA[$F{i040070n}]]></variableExpression>
    </variable>
    <group name="orderId">
        <groupExpression><![CDATA[$F{i040140}]]></groupExpression>
    </group>
    <group name="articleId">
        <groupExpression><![CDATA[$F{i040040}]]></groupExpression>
        <groupFooter>
            <band height="14">
                <textField>
                    <reportElement x="3" y="0" width="48" height="12"/>
                    <textElement>
                        <font fontName="Helvetica" size="9"/>
                    </textElement>
                    <textFieldExpression class="java.lang.String"><![CDATA[$F{i040040}]]></textFieldExpression>
                </textField>
                <textField>
                    <reportElement x="154" y="0" width="40" height="12"/>
                    <textElement textAlignment="Left">
                        <font fontName="Helvetica" size="9"/>
                    </textElement>
                    <textFieldExpression class="java.lang.Integer"><![CDATA[$V{QU_7060N}]]></textFieldExpression>
                </textField>
                <textField pattern="#,##0.00">
                    <reportElement x="106" y="0" width="43" height="12"/>
                    <textElement textAlignment="Left">
                        <font fontName="Helvetica" size="9"/>
                    </textElement>
                    <textFieldExpression class="java.lang.Float"><![CDATA[$V{SUM_I040060N}]]></textFieldExpression>
                </textField>
                <textField pattern="">
                    <reportElement x="248" y="0" width="40" height="12"/>
                    <textElement textAlignment="Left">
                        <font fontName="Helvetica" size="9"/>
                    </textElement>
                    <textFieldExpression class="java.lang.Double"><![CDATA[$F{i040170}]]></textFieldExpression>
                </textField>
                <textField pattern="#,##0.00">
                    <reportElement x="199" y="0" width="41" height="12"/>
                    <textElement textAlignment="Left">
                        <font fontName="Helvetica" size="9"/>
                    </textElement>
                    <textFieldExpression class="java.lang.Float"><![CDATA[]]></textFieldExpression>
                </textField>
                <textField>
                    <reportElement x="63" y="0" width="39" height="12"/>
                    <textElement>
                        <font fontName="Helvetica" size="9"/>
                    </textElement>
                    <textFieldExpression class="java.lang.String"><![CDATA[$F{i040120}]]></textFieldExpression>
                </textField>
                <textField pattern="#,##0.000">
                    <reportElement x="297" y="0" width="40" height="12"/>
                    <textElement textAlignment="Left">
                        <font fontName="Helvetica" size="9"/>
                    </textElement>
                    <textFieldExpression class="java.lang.Double"><![CDATA[$F{i040140}]]></textFieldExpression>
                </textField>
                <textField pattern="#,##0.000">
                    <reportElement x="344" y="0" width="40" height="12"/>
                    <textElement textAlignment="Left">
                        <font fontName="Helvetica" size="9"/>
                    </textElement>
                    <textFieldExpression class="java.lang.Double"><![CDATA[$F{i040100}]]></textFieldExpression>
                </textField>
                <textField pattern="#,##0.000">
                    <reportElement x="391" y="0" width="40" height="12"/>
                    <textElement textAlignment="Left">
                        <font fontName="Helvetica" size="9"/>
                    </textElement>
                    <textFieldExpression class="java.lang.Double"><![CDATA[$F{i040080}]]></textFieldExpression>
                </textField>
                <textField pattern="#,##0.000">
                    <reportElement x="436" y="0" width="40" height="12"/>
                    <textElement textAlignment="Left">
                        <font fontName="Helvetica" size="9"/>
                    </textElement>
                    <textFieldExpression class="java.lang.Double"><![CDATA[$F{i040090}]]></textFieldExpression>
                </textField>
                <textField pattern="#,##0.000">
                    <reportElement x="481" y="0" width="40" height="12"/>
                    <textElement textAlignment="Left">
                        <font fontName="Helvetica" size="9"/>
                    </textElement>
                    <textFieldExpression class="java.lang.Double"><![CDATA[$F{i040110n}]]></textFieldExpression>
                </textField>
            </band>
        </groupFooter>
    </group>
    <columnHeader>
        <band height="17">
            <printWhenExpression><![CDATA[$P{printheader}]]></printWhenExpression>
            <staticText>
                <reportElement x="3" y="3" width="45" height="12"/>
                <textElement>
                    <font fontName="Helvetica" size="9" isBold="true"/>
                </textElement>
                <text><![CDATA[ZUB0010]]></text>
            </staticText>
            <staticText>
                <reportElement x="196" y="3" width="41" height="12"/>
                <textElement>
                    <font fontName="Helvetica" size="9" isBold="true"/>
                </textElement>
                <text><![CDATA[ZUB0030]]></text>
            </staticText>
            <staticText>
                <reportElement x="245" y="3" width="40" height="12"/>
                <textElement>
                    <font fontName="Helvetica" size="9" isBold="true"/>
                </textElement>
                <text><![CDATA[ZUB0035]]></text>
            </staticText>
            <staticText>
                <reportElement x="289" y="3" width="48" height="12"/>
                <textElement>
                    <font fontName="Helvetica" size="9" isBold="true"/>
                </textElement>
                <text><![CDATA[ZUB0040]]></text>
            </staticText>
            <staticText>
                <reportElement x="341" y="3" width="43" height="12"/>
                <textElement>
                    <font fontName="Helvetica" size="9" isBold="true"/>
                </textElement>
                <text><![CDATA[ZUB0045]]></text>
            </staticText>
            <staticText>
                <reportElement x="55" y="3" width="44" height="12"/>
                <textElement>
                    <font fontName="Helvetica" size="9" isBold="true"/>
                </textElement>
                <text><![CDATA[ZUB0015]]></text>
            </staticText>
            <staticText>
                <reportElement x="103" y="3" width="43" height="12"/>
                <textElement>
                    <font fontName="Helvetica" size="9" isBold="true"/>
                </textElement>
                <text><![CDATA[ZUB0020]]></text>
            </staticText>
            <staticText>
                <reportElement x="151" y="3" width="40" height="12"/>
                <textElement>
                    <font fontName="Helvetica" size="9" isBold="true"/>
                </textElement>
                <text><![CDATA[ZUB0025]]></text>
            </staticText>
            <staticText>
                <reportElement x="388" y="3" width="42" height="12"/>
                <textElement>
                    <font fontName="Helvetica" size="9" isBold="true"/>
                </textElement>
                <text><![CDATA[ZUB0050]]></text>
            </staticText>
            <staticText>
                <reportElement x="433" y="3" width="42" height="12"/>
                <textElement>
                    <font fontName="Helvetica" size="9" isBold="true"/>
                </textElement>
                <text><![CDATA[ZUB0060]]></text>
            </staticText>
            <staticText>
                <reportElement x="478" y="3" width="42" height="12"/>
                <textElement>
                    <font fontName="Helvetica" size="9" isBold="true"/>
                </textElement>
                <text><![CDATA[ZUB0070]]></text>
            </staticText>
        </band>
    </columnHeader>
</jasperReport>
 



Post Edited by loge at 06/16/2009 17:45
Link to comment
Share on other sites

  • 5 weeks later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi,

 

How do you create your data source? What tool did you use to design the report?

The problem comes from the fact that the data source you use is created with the capability of using the field description instead of the field name to identify the bean property that it has to read.

For some reason, the field descriptions in your report are present, but empty, hence the error.

 

You could create the data source in such a way that it ignores the fields descriptions (the constructor has a flag).

 

I hope this helps,

Teodor

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...