rob.naban Posted May 6, 2015 Posted May 6, 2015 Hi I have a problem when I have a few items in the list, rectangle don’t down to the end of the band, even with the option for the band height. What can i do? Thanks in advance Obs.: Here the Report01Jrxml ------------------------------------------------------------------------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 6.0.4.final using JasperReports Library version 6.0.4 --> <!-- 2015-05-06T17:18:57 --> <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="Report01" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="ec61bea7-7eee-44ac-869e-8ac7ccafa3e3"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="data.xml"/> <subDataset name="ListEmployee" uuid="019bbbc7-dbec-4e54-a296-6879f04c3f1f"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="data.xml"/> <queryString language="xPath"> <![CDATA[/nf/employee]]> </queryString> <field name="nItem" class="java.lang.String"> <fieldDescription><![CDATA[@nItem]]></fieldDescription> </field> <field name="birthdayyear" class="java.lang.String"> <fieldDescription><![CDATA[birthdayyear]]></fieldDescription> </field> <field name="name" class="java.lang.String"> <fieldDescription><![CDATA[name]]></fieldDescription> </field> </subDataset> <queryString language="xPath"> <![CDATA[/nf]]> </queryString> <field name="employee" class="java.lang.String"> <fieldDescription><![CDATA[employee]]></fieldDescription> </field> <background> <band splitType="Stretch"/> </background> <title> <band height="46" splitType="Stretch"> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> <staticText> <reportElement x="1" y="3" width="552" height="42" uuid="57cdbbab-489e-4fc3-94ab-7e1a82526556"> <property name="local_mesure_unitwidth" value="pixel"/> <property name="com.jaspersoft.studio.unit.width" value="px"/> </reportElement> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="25"/> </textElement> <text><![CDATA[Private Corp.]]></text> </staticText> </band> </title> <pageHeader> <band height="129" splitType="Stretch"> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> <textField> <reportElement x="1" y="40" width="552" height="89" isPrintWhenDetailOverflows="true" uuid="45fe5343-561f-4d47-b82b-b9775b269f2e"> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="16" isItalic="true"/> </textElement> <textFieldExpression><![CDATA["Private Corp, S/A"]]></textFieldExpression> </textField> <staticText> <reportElement x="1" y="-1" width="552" height="41" isPrintWhenDetailOverflows="true" uuid="3f4dec49-4b20-4241-a401-8390986476fb"> <property name="local_mesure_unitwidth" value="pixel"/> <property name="com.jaspersoft.studio.unit.width" value="px"/> </reportElement> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="16" isBold="true" isUnderline="true"/> </textElement> <text><![CDATA[Corporate Name]]></text> </staticText> </band> </pageHeader> <columnHeader> <band height="74" splitType="Stretch"> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> <printWhenExpression><![CDATA[new java.lang.Boolean($V{PAGE_NUMBER}.intValue()==1)]]></printWhenExpression> <textField> <reportElement x="1" y="50" width="552" height="23" isPrintWhenDetailOverflows="true" uuid="2d32c83a-90d0-4c05-8d82-9b8420403b75"> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="local_mesure_unitwidth" value="pixel"/> <property name="com.jaspersoft.studio.unit.width" value="px"/> </reportElement> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="16" isItalic="true"/> </textElement> <textFieldExpression><![CDATA["One Corp"]]></textFieldExpression> </textField> <staticText> <reportElement x="1" y="0" width="552" height="49" isPrintWhenDetailOverflows="true" uuid="6ed7b2bb-ffa8-4038-96ba-a63ff43ef2b2"> <property name="local_mesure_unitwidth" value="pixel"/> <property name="com.jaspersoft.studio.unit.width" value="px"/> </reportElement> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="16" isBold="true" isUnderline="true"/> </textElement> <text><![CDATA[Description]]></text> </staticText> </band> </columnHeader> <detail> <band height="30" splitType="Stretch"> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> <printWhenExpression><![CDATA[new java.lang.Boolean($V{PAGE_NUMBER}.intValue()==1)]]></printWhenExpression> <textField> <reportElement x="1" y="0" width="552" height="29" isPrintWhenDetailOverflows="true" uuid="4ac89141-1cda-4fde-aaf5-b7c616a22b27"> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="local_mesure_unitwidth" value="pixel"/> <property name="com.jaspersoft.studio.unit.width" value="px"/> </reportElement> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="16" isItalic="true"/> </textElement> <textFieldExpression><![CDATA["Two Corp"]]></textFieldExpression> </textField> </band> <band height="117" splitType="Stretch"> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> <printWhenExpression><![CDATA[new java.lang.Boolean($V{PAGE_NUMBER}.intValue()==1)]]></printWhenExpression> <staticText> <reportElement x="1" y="0" width="552" height="32" isPrintWhenDetailOverflows="true" uuid="ff92e187-83bd-4be8-8571-4947f25bb088"> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="local_mesure_unitwidth" value="pixel"/> <property name="com.jaspersoft.studio.unit.width" value="px"/> </reportElement> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="16" isBold="true" isUnderline="true"/> </textElement> <text><![CDATA[Address]]></text> </staticText> <textField> <reportElement x="1" y="33" width="552" height="83" isPrintWhenDetailOverflows="true" uuid="0d1006b8-1852-4bee-883b-3ff9c037e250"> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="16"/> </textElement> <textFieldExpression><![CDATA["Sunset Boulevard Nº1"]]></textFieldExpression> </textField> </band> <band height="86" splitType="Stretch"> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> <componentElement> <reportElement mode="Transparent" x="1" y="60" width="552" height="14" isPrintWhenDetailOverflows="true" uuid="e201d293-2322-4cf1-aadb-e937f7bc4b5d"> <property name="local_mesure_unitCONTENTS.height" value="pixel"/> <property name="com.jaspersoft.studio.unit.CONTENTS.height" value="px"/> </reportElement> <jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical" ignoreWidth="false"> <datasetRun subDataset="ListEmployee" uuid="e168fe53-7ae7-46ba-8416-0a4b989a1572"> <dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).dataSource("/nf/employee")]]></dataSourceExpression> </datasetRun> <jr:listContents height="14" width="552"> <textField isStretchWithOverflow="true"> <reportElement x="0" y="0" width="100" height="14" uuid="5a75974f-2e9b-487b-91c9-5173797037df"> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <textElement textAlignment="Center" verticalAlignment="Middle"> <paragraph tabStopWidth="0"/> </textElement> <textFieldExpression><![CDATA[$F{nItem}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true"> <reportElement x="447" y="0" width="100" height="14" uuid="ed4691e0-6618-472f-8862-3367cfc80dbf"> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <textElement textAlignment="Center" verticalAlignment="Middle"> <paragraph tabStopWidth="0"/> </textElement> <textFieldExpression><![CDATA[$F{birthdayyear}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true"> <reportElement x="100" y="0" width="347" height="14" uuid="77443547-879f-4505-8b59-149aab93dfd3"> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <textElement textAlignment="Center" verticalAlignment="Middle"> <paragraph tabStopWidth="0"/> </textElement> <textFieldExpression><![CDATA[$F{name}]]></textFieldExpression> </textField> </jr:listContents> </jr:list> </componentElement> <staticText> <reportElement x="1" y="-1" width="552" height="30" isPrintWhenDetailOverflows="true" uuid="edcb7927-ee78-4b27-869c-a6ccbb0fadb0"> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="16" isBold="true" isUnderline="true"/> </textElement> <text><![CDATA[Employees]]></text> </staticText> <staticText> <reportElement x="1" y="30" width="100" height="27" isPrintWhenDetailOverflows="true" uuid="e91949ac-f40f-471b-aec7-876ac63a3047"> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="16" isBold="true" isItalic="true" isUnderline="false"/> </textElement> <text><![CDATA[Number]]></text> </staticText> <staticText> <reportElement x="101" y="30" width="348" height="27" isPrintWhenDetailOverflows="true" uuid="efb7cea9-6f9b-492f-a0ce-2314d4840366"> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="16" isBold="true" isItalic="true" isUnderline="false"/> </textElement> <text><![CDATA[Name]]></text> </staticText> <staticText> <reportElement x="449" y="30" width="104" height="27" isPrintWhenDetailOverflows="true" uuid="9a66139f-ee9d-4664-b36b-0929440cf6d3"> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="12" isBold="true" isItalic="true" isUnderline="false"/> </textElement> <text><![CDATA[Year of BirthDay]]></text> </staticText> <rectangle> <reportElement stretchType="RelativeToBandHeight" mode="Transparent" x="1" y="57" width="100" height="28" isPrintWhenDetailOverflows="true" uuid="6fcd45f6-4e1a-4943-ac4d-8b33fb8f1387"> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> </rectangle> <rectangle> <reportElement stretchType="RelativeToBandHeight" mode="Transparent" x="101" y="57" width="348" height="28" isPrintWhenDetailOverflows="true" uuid="3f9f201e-8ae4-4650-be61-48158c67fd26"> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> </rectangle> <rectangle> <reportElement stretchType="RelativeToBandHeight" mode="Transparent" x="449" y="57" width="104" height="28" isPrintWhenDetailOverflows="true" uuid="f2777c33-e2df-4336-816e-43f40f9c95aa"> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> </rectangle> </band> </detail> <columnFooter> <band height="106" splitType="Stretch"> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> <printWhenExpression><![CDATA[new java.lang.Boolean($V{PAGE_NUMBER}.intValue()==1)]]></printWhenExpression> <staticText> <reportElement x="1" y="-1" width="552" height="27" isPrintWhenDetailOverflows="true" uuid="084029bf-e4e0-4b98-8d3d-00967df1a3cf"> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="local_mesure_unitwidth" value="pixel"/> <property name="com.jaspersoft.studio.unit.width" value="px"/> </reportElement> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="16"/> </textElement> <text><![CDATA[Obs.:]]></text> </staticText> <textField> <reportElement x="1" y="26" width="552" height="78" isPrintWhenDetailOverflows="true" uuid="4f3fd3d0-4a36-4f46-92fb-faadf47668cd"> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="local_mesure_unitwidth" value="pixel"/> <property name="com.jaspersoft.studio.unit.width" value="px"/> </reportElement> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="16"/> </textElement> <textFieldExpression><![CDATA["Ok"]]></textFieldExpression> </textField> </band> </columnFooter> </jasperReport> ============================================================================================= Here the XML ------------------------------------------------------------------------------------------------------------------------------------------------------------------- <nf> <employee nItem="1"> <birthdayyear>1971</birthdayyear> <name>John</name> </employee> <employee nItem="2"> <birthdayyear>1972</birthdayyear> <name>Mark</name> </employee> <employee nItem="3"> <birthdayyear>1973</birthdayyear> <name>Rose</name> </employee> <employee nItem="4"> <birthdayyear>1974</birthdayyear> <name>Judith</name> </employee> <employee nItem="5"> <birthdayyear>1975</birthdayyear> <name>Tyson</name> </employee> <employee nItem="6"> <birthdayyear>1976</birthdayyear> <name>Maria</name> </employee> <employee nItem="7"> <birthdayyear>1977</birthdayyear> <name>Glen</name> </employee> <employee nItem="8"> <birthdayyear>1978</birthdayyear> <name>Rita</name> </employee> <employee nItem="9"> <birthdayyear>1979</birthdayyear> <name>Elizabeth</name> </employee> <employee nItem="10"> <birthdayyear>1980</birthdayyear> <name>Mario</name> </employee> </nf>
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