my jrxml just can find only one row

0

I have four row inside sql,but when I finish set up jrxml

and run test after,I just get a one row,

I don't know where have problem

and this's my jrxml..

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.2.0.final using JasperReports Library version 6.2.0  -->
<!-- 2016-01-13T11:37:51 -->
<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="T0113" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" >
    <property name="com.jaspersoft.studio.data.sql.tables" value=""/>
    <property name="com.jaspersoft.studio.data.defaultdataadapter" value="Test"/>
    <queryString>
        <![CDATA[select * from person ]]>
    </queryString>
    <field name="ID" class="java.lang.String">
        <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <field name="NAME" class="java.lang.String">
        <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <group name="ID">
        <groupExpression><![CDATA[$F{ID}]]></groupExpression>
    </group>
    <group name="NAME">
        <groupExpression><![CDATA[$F{NAME}]]></groupExpression>
    </group>
    <background>
        <band splitType="Stretch"/>
    </background>
    <title>
        <band height="79" splitType="Stretch">
            <staticText>
                <reportElement x="240" y="0" width="100" height="30" />
                <text><![CDATA[PDFPDF]]></text>
            </staticText>
        </band>
    </title>
    <columnHeader>
        <band height="61" splitType="Stretch">
            <textField>
                <reportElement x="170" y="15" width="100" height="30" />
                <textFieldExpression><![CDATA[$F{ID}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="320" y="10" width="100" height="30" />
                <textFieldExpression><![CDATA[$F{NAME}]]></textFieldExpression>
            </textField>
        </band>
    </columnHeader>
    <columnFooter>
        <band height="45" splitType="Stretch"/>
    </columnFooter>
</jasperReport>
free576002's picture
Joined: Jan 11 2016 - 9:04pm
Last seen: 3 years 3 months ago

2 Answers:

1

You should use group bands or detail band for fetching data not column bands.

zh3ntil's picture
531
Joined: Nov 19 2014 - 11:02pm
Last seen: 3 years 1 week ago
0

Thank I get it

free576002's picture
Joined: Jan 11 2016 - 9:04pm
Last seen: 3 years 3 months ago
Feedback