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

creating your first report from ireport ultimate guide creates an empty document


mariuss
Go to solution Solved by hishamkmr,

Recommended Posts

Hello community,

I'm trying to start with iReport and when I go through the tutorial "2.10 Creating Your First Report" from the ebook ireport ultimate guide, then I can preview just an empty document with 13 pages.

Does anybody have an idea what do i miss?

Thank you

Marius

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Thank you vaibhav.lather for your attention!

I'll try to give you a little bit more of information. The OS is Windows 7 64 bit.

The genereted jrxml is:

<?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="report2" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="5f12eac9-cd29-463b-9bf2-ab69451a0cbc">
    <queryString language="SQL">
        <![CDATA[select * from address order by city]]>
    </queryString>
    <field name="ID" class="java.lang.Integer"/>
    <field name="FIRSTNAME" class="java.lang.String"/>
    <field name="LASTNAME" class="java.lang.String"/>
    <field name="STREET" class="java.lang.String"/>
    <field name="CITY" class="java.lang.String"/>
    <group name="CITY">
        <groupExpression><![CDATA[$F{CITY}]]></groupExpression>
    </group>
    <background>
        <band splitType="Stretch"/>
    </background>
    <title>
        <band height="79" splitType="Stretch"/>
    </title>
    <pageHeader>
        <band height="35" splitType="Stretch"/>
    </pageHeader>
    <columnHeader>
        <band height="61" splitType="Stretch"/>
    </columnHeader>
    <detail>
        <band height="125" splitType="Stretch"/>
    </detail>
    <columnFooter>
        <band height="45" splitType="Stretch"/>
    </columnFooter>
    <pageFooter>
        <band height="54" splitType="Stretch"/>
    </pageFooter>
    <summary>
        <band height="42" splitType="Stretch"/>
    </summary>
</jasperReport>

and it is different and much shorter as the Code Example 3-1 from iReport Ultimate Guide.

I don't know where to find the java code, I found just the .jasper file with the compiled code and uploaded as an attachment.

Could that be, that the guide is not anymore updated and that I miss some steps?

Would you be nice to give me some hint how to get it working?

Thank you

Marius

Link to comment
Share on other sites

  • Solution

Dear Marius

I just downloaded ur jasper file. In that design template is empty

Go to the report inspector and drill the "Field" from there you can see the fields got using your query in i-report

drag and drop the needed fields in to the detail band of ireport and run the report.it will show the data..

 

hope it help..let me know the result

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...