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

Pls Moderator help me out with the compile error


ogidantunde

Recommended Posts

Hello, i'm quite new to jasper reports. and i'm trying to embed it in my application.However i guess thejrxml file was successfully parsed. I'm using a custom table model as my data source but i recieve the following compile error
Code:
net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
1. java.lang.Integer cannot be resolved or is not a type
value = (java.lang.Integer)(new Integer(1));//$JR_EXPR_ID=0$
<--------------->
2. java.lang.Integer cannot be resolved or is not a type
value = (java.lang.Integer)(new Integer(1));//$JR_EXPR_ID=1$
<--------------->
3. java.lang.Integer cannot be resolved or is not a type
value = (java.lang.Integer)(new Integer(1));//$JR_EXPR_ID=2$
<--------------->
4. java.lang.Integer cannot be resolved or is not a type
value = (java.lang.Integer)(new Integer(0));//$JR_EXPR_ID=3$
<--------------->
5. java.lang.Integer cannot be resolved or is not a type
value = (java.lang.Integer)(new Integer(1));//$JR_EXPR_ID=4$
<--------------->
6. java.lang.Integer cannot be resolved or is not a type
value = (java.lang.Integer)(new Integer(0));//$JR_EXPR_ID=5$
<--------------->
7. java.lang.Integer cannot be resolved or is not a type
value = (java.lang.Integer)(new Integer(1));//$JR_EXPR_ID=6$
<--------------->
8. java.lang.Integer cannot be resolved or is not a type
value = (java.lang.Integer)(new Integer(0));//$JR_EXPR_ID=7$
<--------------->
9. java.lang.Integer cannot be resolved or is not a type
value = (java.lang.Integer)(new Integer(1));//$JR_EXPR_ID=0$
<--------------->
10. java.lang.Integer cannot be resolved or is not a type
value = (java.lang.Integer)(new Integer(1));//$JR_EXPR_ID=1$
<--------------->
11. java.lang.Integer cannot be resolved or is not a type
value = (java.lang.Integer)(new Integer(1));//$JR_EXPR_ID=2$
<--------------->
12. java.lang.Integer cannot be resolved or is not a type
value = (java.lang.Integer)(new Integer(0));//$JR_EXPR_ID=3$
<--------------->
13. java.lang.Integer cannot be resolved or is not a type
value = (java.lang.Integer)(new Integer(1));//$JR_EXPR_ID=4$
<--------------->
14. java.lang.Integer cannot be resolved or is not a type
value = (java.lang.Integer)(new Integer(0));//$JR_EXPR_ID=5$
<--------------->
15. java.lang.Integer cannot be resolved or is not a type
value = (java.lang.Integer)(new Integer(1));//$JR_EXPR_ID=6$
<--------------->
16. java.lang.Integer cannot be resolved or is not a type
value = (java.lang.Integer)(new Integer(0));//$JR_EXPR_ID=7$
<--------------->
17. java.lang.Integer cannot be resolved or is not a type
value = (java.lang.Integer)(new Integer(1));//$JR_EXPR_ID=0$
<--------------->
18. java.lang.Integer cannot be resolved or is not a type
value = (java.lang.Integer)(new Integer(1));//$JR_EXPR_ID=1$
<--------------->
19. java.lang.Integer cannot be resolved or is not a type
value = (java.lang.Integer)(new Integer(1));//$JR_EXPR_ID=2$
<--------------->
20. java.lang.Integer cannot be resolved or is not a type
value = (java.lang.Integer)(new Integer(0));//$JR_EXPR_ID=3$
<--------------->
21. java.lang.Integer cannot be resolved or is not a type
value = (java.lang.Integer)(new Integer(1));//$JR_EXPR_ID=4$
<--------------->
22. java.lang.Integer cannot be resolved or is not a type
value = (java.lang.Integer)(new Integer(0));//$JR_EXPR_ID=5$
<--------------->
23. java.lang.Integer cannot be resolved or is not a type
value = (java.lang.Integer)(new Integer(1));//$JR_EXPR_ID=6$
<--------------->
24. java.lang.Integer cannot be resolved or is not a type
value = (java.lang.Integer)(new Integer(0));//$JR_EXPR_ID=7$
<--------------->
24 errors

at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:193)
at net.sf.jasperreports.engine.JasperCompileManager.compileReport(Jasper
CompileManager.java:219)
at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:152)
The jrxml listing goes thus
Code:
[code]<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jasperReport PUBLIC "-//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
<jasperReport name="SalesInvoice" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="30" bottomMargin="30" isFloatColumnFooter="true" >

<style name="Arial_Normal" isDefault="true" fontName="Arial" fontSize="8" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<style name="Arial_Bold" isDefault="false" fontName="Arial" fontSize="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<style name="Arial_Italic" isDefault="false" fontName="Arial" fontSize="8" isBold="false" isItalic="true" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica-Oblique" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<style name="Comic_Normal" isDefault="false" fontName="Comic Sans MS" fontSize="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="COMIC.TTF" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
<style name="Comic_Bold" isDefault="false" fontName="Comic Sans MS" fontSize="10" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="COMICBD.TTF" pdfEncoding="Identity-H" isPdfEmbedded="true"/>

<parameter name="CompanyName" class="java.lang.String">
</parameter>
<parameter name="CompanyAddress" class="java.lang.String">
</parameter>
<parameter name="CompanyLogo" class="java.awt.Image">
</parameter>
<parameter name="SalesId" class="java.lang.String">
</parameter>
<parameter name="CustomerId" class="java.lang.String">
</parameter>
<parameter name="CustomerName" class="java.lang.String">
</parameter>

<field name="COLUMN_0" class="java.lang.String">
</field>
<field name="COLUMN_1" class="java.lang.String">
</field>
<field name="COLUMN_2" class="java.lang.String">
</field>
<field name="COLUMN_3" class="java.lang.String">
</field>
<field name="COLUMN_4" class="java.lang.String">
</field>
<field name="COLUMN_5" class="java.lang.String">
</field>
<field name="COLUMN_6" class="java.lang.String">
</field>

<title>
<band height="100">
<textField isBlankWhenNull="true">
<reportElement x="0" y="0" width="375" height="35" style="Comic_Bold"/>
<textElement textAlignment="Center">
<font size="22"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{CompanyName}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="0" y="40" width="400" height="20" style="Comic_Bold"/>
<textElement textAlignment="Center">
<font size="10"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{CompanyAddress}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="0" y="60" width="375" height="25" style="Arial_Bold"/>
<textElement textAlignment="Center">
<font size="12"/>
</textElement>
<text><![CDATA[sales Invoice And Reciept]]></text>
</staticText>
</band>
</title>

<columnHeader>
<band height="11">
<staticText>
<reportElement mode="Opaque" x="0" y="0" width="50" height="11" forecolor="#ffffff" backcolor="#333333" style="Arial_Bold"/>
<textElement textAlignment="Center"/>
<text><![CDATA[Product]]></text>
</staticText>
<staticText>
<reportElement mode="Opaque" x="50" y="0" width="50" height="11" forecolor="#ffffff" backcolor="#333333" style="Arial_Bold"/>
<textElement textAlignment="Center"/>
<text><![CDATA[unit Price]]></text>
</staticText>
<staticText>
<reportElement mode="Opaque" x="100" y="0" width="50" height="11" forecolor="#ffffff" backcolor="#333333" style="Arial_Bold"/>
<text><![CDATA[Quantity]]></text>
</staticText>
<staticText>
<reportElement mode="Opaque" x="150" y="0" width="50" height="11" forecolor="#ffffff" backcolor="#333333" style="Arial_Bold"/>
<textElement textAlignment="Right"/>
<text><![CDATA[Amount]]></text>
</staticText>
<staticText>
<reportElement mode="Opaque" x="200" y="0" width="50" height="11" forecolor="#ffffff" backcolor="#333333" style="Arial_Bold"/>
<textElement textAlignment="Center"/>
<text><![CDATA[sales Price]]></text>
</staticText>
<staticText>
<reportElement mode="Opaque" x="250" y="0" width="50" height="11" forecolor="#ffffff" backcolor="#333333" style="Arial_Bold"/>
<textElement textAlignment="Center"/>
<text><![CDATA[Discount]]></text>
</staticText>
<staticText>
<reportElement mode="Opaque" x="300" y="0" width="50" height="11" forecolor="#ffffff" backcolor="#333333" style="Arial_Bold"/>
<text><![CDATA[Amt Payable]]></text>
</staticText>
</band>
</columnHeader>
<detail>
<band height="13">
<textField isStretchWithOverflow="true">
<reportElement positionType="Float" x="0" y="0" width="50" height="11"/>
<textElement textAlignment="Left"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{COLUMN_0}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement positionType="Float" x="50" y="0" width="50" height="11"/>
<textElement textAlignment="Right"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{COLUMN_1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement positionType="Float" x="100" y="0" width="50" height="11"/>
<textElement textAlignment="Right"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{COLUMN_2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement positionType="Float" x="150" y="0" width="50" height="11"/>
<textElement textAlignment="Right"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{COLUMN_3}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement positionType="Float" x="200" y="0" width="50" height="11"/>
<textElement textAlignment="Right"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{COLUMN_4}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement positionType="Float" x="250" y="0" width="50" height="11"/>
<textElement textAlignment="Right"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{COLUMN_5}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement positionType="Float" x="300" y="0" width="50" height="11"/>
<textElement textAlignment="Right"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{COLUMN_6}]]></textFieldExpression>
</textField>
<line>
<reportElement positionType="Float" x="0" y="12" width="270" height="1" forecolor="#808080"/>
<graphicElement>
<pen lineWidth="0.5"/>
</graphicElement>
</line>
</band>
</detail>

</jasperReport>
Please can someone just help me out its very urgent . I'd like to the advantages of jasper reports in my latest project or i might be forced to find another way. Thanks alot. I just can't wait.
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

I don't think the entire JRXML file got pasted in. The report properties section is missing, also there is no query (unless this is a java bean report or csv, in which case no query tag is required). To properly help you the entire JRXML file is required.
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...