Versão atual:

Erro no relatório com IReport

Bom dia Pessoal Estou tentando gerar um relatório mas está ocorrendo o seguinte erro!

Error filling print... java.lang.String cannot be cast to java.lang.Boolean 
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean  
    at net.sf.jasperreports.engine.fill.JRFillElement.evaluatePrintWhenExpression(JRFillElement.java:759)  
    at net.sf.jasperreports.engine.fill.JRFillTextField.evaluate(JRFillTextField.java:434)  
    at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer
.java:259)  
    at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:455)  
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:
2044)  
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:778
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:288)  
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:151)
    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:909)  
    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:841)  
    at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:88)  
    at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:653)  
    at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:569)  
    at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:915)  
    at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:928)     at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)  
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)  

Print not filled. Try to use an EmptyDataSource...

segue o XML do relatório

<?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="Orcamento" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="5418a6f4-6315-40c9-ae6a-c8a5d83e13bd">
    <property name="ireport.zoom" value="1.5"/>
    <property name="ireport.x" value="0"/>
    <property name="ireport.y" value="451"/>
    <parameter name="nomeEmpresa" class="java.lang.String"/>
    <parameter name="endereco" class="java.lang.String"/>
    <parameter name="bairro" class="java.lang.String"/>
    <parameter name="cidade" class="java.lang.String"/>
    <parameter name="uf" class="java.lang.String"/>
    <parameter name="fone" class="java.lang.String"/>
    <parameter name="cliente" class="java.lang.String"/>
    <parameter name="vendedor" class="java.lang.String"/>
    <parameter name="subTotal" class="java.lang.String"/>
    <parameter name="descontoVenda" class="java.lang.Double"/>
    <parameter name="total" class="java.lang.String"/>
    <parameter name="obs" class="java.lang.String"/>
    <parameter name="formaPagamento" class="java.lang.String"/>
    <parameter name="cpfCliente" class="java.lang.String"/>
    <parameter name="enderecoCliente" class="java.lang.String"/>
    <parameter name="foneCliente" class="java.lang.String"/>
    <parameter name="obsFormaPagamentoAPrazo" class="java.lang.String"/>
    <parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
        <defaultValueExpression><![CDATA["E:\\01 - JAVA\\08-INTELLIJ\\FJSystem\\src\\Reports\\ArchivesToGenerateReport\\"]]></defaultValueExpression>
    </parameter>
    <parameter name="ListFormaPagamento" class="java.util.List"/>
    <field name="name" class="java.lang.String"/>
    <field name="quantidade" class="java.lang.Integer"/>
    <field name="valorUnitario" class="java.lang.Double"/>
    <field name="valorTotal" class="java.lang.Double"/>
    <field name="descontoProduto" class="java.lang.Double"/>
    <background>
        <band splitType="Stretch"/>
    </background>
    <title>
        <band height="49" splitType="Stretch">
            <textField>
                <reportElement uuid="3c2611b3-9c13-4644-aeab-dd6a67468db3" x="0" y="0" width="555" height="20"/>
                <textElement verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="14" isItalic="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{nomeEmpresa}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement uuid="732c31f9-1be2-421a-a26f-f5803db269d7" x="0" y="35" width="273" height="14"/>
                <textElement verticalAlignment="Middle">
                    <font fontName="Times New Roman" isBold="true" isItalic="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{fone}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement uuid="46fabdd8-fa69-4676-b978-1f34d4100dd0" x="0" y="20" width="273" height="15"/>
                <textElement verticalAlignment="Middle">
                    <font fontName="Times New Roman" isBold="true" isItalic="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{cidade}]]></textFieldExpression>
            </textField>
        </band>
    </title>
    <pageHeader>
        <band height="196" splitType="Stretch">
            <staticText>
                <reportElement uuid="5bff9d6e-41d5-449d-9ed9-f728e39c71d1" x="223" y="0" width="104" height="24"/>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="16" isBold="true" isItalic="true" isUnderline="true"/>
                </textElement>
                <text><![CDATA[Venda]]></text>
            </staticText>
            <textField>
                <reportElement uuid="9516ab6b-4f66-4457-b5b2-d0d7fd616c20" x="45" y="36" width="216" height="20"/>
                <textElement verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="8" isBold="true" isItalic="false"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{cliente}]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement uuid="e9bf9a61-3b31-48b5-bf5b-45131eb241e7" x="0" y="36" width="45" height="20"/>
                <textElement textAlignment="Right" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="8" isItalic="true"/>
                </textElement>
                <text><![CDATA[Cliente: ]]></text>
            </staticText>
            <staticText>
                <reportElement uuid="dfe54ffb-b5da-4a55-92f4-597e63c5e43e" x="275" y="36" width="52" height="20"/>
                <textElement textAlignment="Right" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="8" isItalic="true"/>
                </textElement>
                <text><![CDATA[Vendedor: ]]></text>
            </staticText>
            <textField>
                <reportElement uuid="3cf364e7-b99d-4974-b8d3-5bdb102348a6" x="327" y="36" width="228" height="20"/>
                <textElement verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="8" isBold="true" isItalic="false"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{vendedor}]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement uuid="20d98a8e-2bbb-42b4-821f-d021017ed21f" x="0" y="136" width="45" height="19"/>
                <textElement verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="8" isItalic="true"/>
                </textElement>
                <text><![CDATA[SubTotal:]]></text>
            </staticText>
            <textField>
                <reportElement uuid="b7bfbd2c-bc11-497c-8c10-2ad5e7678e4d" x="45" y="135" width="113" height="20"/>
                <textElement verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="8" isBold="true" isItalic="false"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{subTotal}]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement uuid="60cf7fe9-966d-4b59-9bcc-c74cd43383e3" x="199" y="136" width="50" height="19"/>
                <textElement verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="8" isItalic="true"/>
                </textElement>
                <text><![CDATA[Desc.(%)]]></text>
            </staticText>
            <textField>
                <reportElement uuid="6e02a0ea-9c7f-4318-b543-3b7f499075be" x="249" y="136" width="78" height="19"/>
                <textElement verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="8" isBold="true" isItalic="false"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{descontoVenda}]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement uuid="f0748cf3-8477-4840-8651-d148b670a0f6" x="349" y="136" width="27" height="19"/>
                <textElement verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="8" isItalic="true"/>
                </textElement>
                <text><![CDATA[Total:]]></text>
            </staticText>
            <textField>
                <reportElement uuid="65ccf206-d7e2-496b-8991-c63bf8badfcc" x="376" y="136" width="139" height="19"/>
                <textElement verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="8" isBold="true" isItalic="false"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{total}]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement uuid="9d9e8a9d-94e2-410e-ba80-55e907c87b34" x="0" y="155" width="69" height="20"/>
                <textElement verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="8" isBold="false" isItalic="true"/>
                </textElement>
                <text><![CDATA[Forma de Pgto.:]]></text>
            </staticText>
            <staticText>
                <reportElement uuid="cb5831cb-d5e1-4503-96f2-b9e15a13d46c" x="0" y="56" width="45" height="20"/>
                <textElement textAlignment="Right" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="6" isItalic="true"/>
                </textElement>
                <text><![CDATA[CPF/CNPJ: ]]></text>
            </staticText>
            <staticText>
                <reportElement uuid="ea938711-8bb5-4ec5-bd96-56ce848cd17d" x="0" y="76" width="45" height="20"/>
                <textElement textAlignment="Right" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="8" isItalic="true"/>
                </textElement>
                <text><![CDATA[Endereço:]]></text>
            </staticText>
            <staticText>
                <reportElement uuid="9d0391e8-9528-41af-98cd-4122489ada8a" x="0" y="96" width="45" height="20"/>
                <textElement textAlignment="Right" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="8" isBold="false" isItalic="true"/>
                </textElement>
                <text><![CDATA[Telefone:]]></text>
            </staticText>
            <textField>
                <reportElement uuid="f6c138b7-b323-4d95-b21d-9443b57f81b7" x="45" y="56" width="216" height="20"/>
                <textElement verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="8" isBold="true" isItalic="false"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{cpfCliente}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement uuid="0ad11af0-dec6-42b8-96dc-6cd07d3dd4ba" x="45" y="76" width="510" height="20"/>
                <textElement verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="8" isBold="true" isItalic="false"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{enderecoCliente}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement uuid="b6aae45c-98a3-48aa-90d9-d1caedfdf113" x="45" y="96" width="151" height="20"/>
                <textElement verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="8" isBold="true" isItalic="false"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{foneCliente}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement uuid="28531319-f601-4a1f-a137-eaa1ffd1d1c2" x="69" y="156" width="486" height="40"/>
                <textElement verticalAlignment="Top">
                    <font fontName="Times New Roman" size="8" isBold="true" isItalic="false"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{formaPagamento}]]></textFieldExpression>
            </textField>
        </band>
    </pageHeader>
    <columnHeader>
        <band height="40" splitType="Stretch">
            <staticText>
                <reportElement uuid="fe1f7326-d856-4bcf-b34f-36cafebdbb21" x="196" y="0" width="165" height="20"/>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="10" isBold="true" isItalic="true"/>
                </textElement>
                <text><![CDATA[Lista de Produtos da Venda]]></text>
            </staticText>
            <staticText>
                <reportElement uuid="29ef5057-ba86-4add-b22a-e8d5f2d48fa8" x="0" y="20" width="223" height="20"/>
                <textElement verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="8" isItalic="true"/>
                </textElement>
                <text><![CDATA[Produto]]></text>
            </staticText>
            <staticText>
                <reportElement uuid="eeeb265b-5aa2-4544-bfc6-00dd7cb116fa" x="223" y="20" width="38" height="20"/>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="8" isItalic="true"/>
                </textElement>
                <text><![CDATA[Qtd.]]></text>
            </staticText>
            <staticText>
                <reportElement uuid="43e20cb1-c431-43ce-8e21-baa2084a8f01" x="261" y="20" width="66" height="20"/>
                <textElement verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="8" isItalic="true"/>
                </textElement>
                <text><![CDATA[Valor Unit.]]></text>
            </staticText>
            <staticText>
                <reportElement uuid="f87c4971-c6e3-4a9c-9205-813cb82115f4" x="327" y="20" width="49" height="20"/>
                <textElement verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="8" isItalic="true"/>
                </textElement>
                <text><![CDATA[Desc. (%)]]></text>
            </staticText>
            <staticText>
                <reportElement uuid="b24447d9-cd7c-419c-a8ea-6bf77d0b9fdb" x="376" y="20" width="100" height="20"/>
                <textElement verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="8" isItalic="true"/>
                </textElement>
                <text><![CDATA[Total]]></text>
            </staticText>
        </band>
    </columnHeader>
    <detail>
        <band height="20" splitType="Stretch">
            <rectangle>
                <reportElement uuid="1d72689e-92b3-4825-b3ee-a8a55a904ee9" x="0" y="0" width="555" height="20" forecolor="#CCCCCC" backcolor="#CCCCCC">
                    <printWhenExpression><![CDATA[new Boolean( $V{COLUMN_COUNT}.intValue()%2==0?true:false )]]></printWhenExpression>
                </reportElement>
            </rectangle>
            <textField>
                <reportElement uuid="c563c3a7-3808-4c66-87a8-4d3537116a99" x="0" y="0" width="223" height="20"/>
                <textElement verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="8" isItalic="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{name}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement uuid="9f46069e-13e1-4d1e-a1fc-30fd0e493ab4" x="223" y="0" width="38" height="20"/>
                <textElement verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="8" isItalic="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{quantidade}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement uuid="1e308f6f-7ac5-4359-a070-6bd46fb1f356" x="327" y="0" width="49" height="20"/>
                <textElement verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="8" isItalic="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{descontoProduto}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement uuid="8ebf6b71-cf32-41c4-80bb-e2e87dcff6f2" x="376" y="0" width="100" height="20">
                    <printWhenExpression><![CDATA["R$ "+$F{valorTotal}]]></printWhenExpression>
                </reportElement>
                <textElement verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="8" isItalic="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{valorTotal}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement uuid="9212b6c1-71ad-4c27-9bad-98b97ada87dc" x="261" y="0" width="66" height="20">
                    <printWhenExpression><![CDATA["R$ "+$F{valorUnitario}]]></printWhenExpression>
                </reportElement>
                <textElement verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="8" isItalic="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{valorUnitario}]]></textFieldExpression>
            </textField>
        </band>
        <band height="112">
            <textField>
                <reportElement uuid="1dd4fd13-7a30-429b-99f9-5f6e33fd5a89" x="0" y="0" width="555" height="58"/>
                <textElement verticalAlignment="Middle">
                    <font fontName="Times New Roman" isItalic="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{obsFormaPagamentoAPrazo}]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement uuid="3a3a21eb-512c-49c1-8f18-02ae4915ffa0" x="0" y="72" width="100" height="20"/>
                <textElement verticalAlignment="Bottom">
                    <font fontName="Times New Roman" isBold="true" isItalic="true"/>
                </textElement>
                <text><![CDATA[Parcelamento]]></text>
            </staticText>
            <staticText>
                <reportElement uuid="c1289753-1118-42e9-9f20-a091754d8162" x="0" y="92" width="32" height="20"/>
                <textElement textAlignment="Right" verticalAlignment="Middle">
                    <font fontName="Times New Roman"/>
                </textElement>
                <text><![CDATA[N°  ]]></text>
            </staticText>
            <staticText>
                <reportElement uuid="dc125cb3-3ad7-430a-a4c9-b3adeaaf434f" x="139" y="92" width="102" height="20"/>
                <textElement verticalAlignment="Middle">
                    <font fontName="Times New Roman" isBold="false" isItalic="false"/>
                </textElement>
                <text><![CDATA[ Vencimento]]></text>
            </staticText>
            <staticText>
                <reportElement uuid="5b46edf8-6375-4e21-bb76-9490e5d307c1" x="241" y="92" width="86" height="20"/>
                <textElement verticalAlignment="Middle">
                    <font fontName="Times New Roman"/>
                </textElement>
                <text><![CDATA[Valor da Parcela]]></text>
            </staticText>
            <staticText>
                <reportElement uuid="0d54f499-0dcd-4436-8984-e836fbe1aa4d" x="32" y="92" width="107" height="20"/>
                <textElement verticalAlignment="Middle">
                    <font fontName="Times New Roman" isBold="false" isItalic="false"/>
                </textElement>
                <text><![CDATA[Forma de Pagamento]]></text>
            </staticText>
        </band>
        <band height="20">
            <rectangle>
                <reportElement uuid="c39c4ff8-9672-42c9-87f3-6a2d016ba392" x="0" y="0" width="555" height="20" forecolor="#CCCCCC" backcolor="#CCCCCC">
                    <printWhenExpression><![CDATA[new Boolean( $V{COLUMN_COUNT}.intValue()%2==0?true:false )]]></printWhenExpression>
                </reportElement>
            </rectangle>
            <subreport isUsingCache="false" runToBottom="false">
                <reportElement uuid="0611ec48-4fce-4d2b-aa62-4486a92bdd6a" x="0" y="0" width="361" height="20"/>
                <subreportParameter name="SUBREPORT_DIR">
                    <subreportParameterExpression><![CDATA[$P{SUBREPORT_DIR}]]></subreportParameterExpression>
                </subreportParameter>
                <subreportParameter name="REPORT_DATA_SOURCE">
                    <subreportParameterExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($P{ListFormaPagamento})]]></subreportParameterExpression>
                </subreportParameter>
                <subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "Venda_subParcelas.jasper"]]></subreportExpression>
            </subreport>
        </band>
    </detail>
    <columnFooter>
        <band height="45" splitType="Stretch">
            <textField>
                <reportElement uuid="6731f471-6eb5-4785-a07c-114e0ed09b12" x="0" y="0" width="555" height="45"/>
                <textElement verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="6" isBold="true" isItalic="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{obs}]]></textFieldExpression>
            </textField>
        </band>
    </columnFooter>
    <pageFooter>
        <band height="18" splitType="Stretch">
            <textField>
                <reportElement uuid="89e71092-e881-43d4-978c-06879da516fd" x="435" y="0" width="80" height="18"/>
                <textElement textAlignment="Right" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="8"/>
                </textElement>
                <textFieldExpression><![CDATA["Pag "+$V{PAGE_NUMBER}+" de"]]></textFieldExpression>
            </textField>
            <textField evaluationTime="Report">
                <reportElement uuid="5701b211-9bbb-4174-8c40-5f4a93315607" x="515" y="0" width="40" height="18"/>
                <textElement verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="8"/>
                </textElement>
                <textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
            </textField>
        </band>
    </pageFooter>
    <summary>
        <band height="42" splitType="Stretch"/>
    </summary>
</jasperReport>

Versão(1):

Ver a versão formatada

Erro no relatório com IReport

Comentário

new question