free576002 Posted January 13, 2016 Share Posted January 13, 2016 I have four row inside sql,but when I finish set up jrxmland run test after,I just get a one row,I don't know where have problemand 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> Link to comment Share on other sites More sharing options...
Solution zh3ntil Posted January 13, 2016 Solution Share Posted January 13, 2016 You should use group bands or detail band for fetching data not column bands. Link to comment Share on other sites More sharing options...
free576002 Posted January 13, 2016 Author Share Posted January 13, 2016 Thank I get it Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now