-1
Я хочу удалить пространство компонентов списка, когда данные равны нулю, я попробовал (удалить строку, когда пусто), но нет необходимости, он печатает пространство с высотой компонента списка , спасибо, что нужна помощь.Удалить пространство компонента списка в jasper ireport
<?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="List" language="groovy" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="179e723d-ee8c-40bf-9ef6-914cef106c9a">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<subDataset name="dataset1" uuid="005448a6-5d6c-44c5-b063-7e85cdcd0cfe"/>
<subDataset name="dataset2" uuid="d8b4d679-e011-4828-adc5-cc0feeea6b44"/>
<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">
<componentElement>
<reportElement x="5" y="13" width="797" height="88" uuid="d03a66cd-2364-4705-b9c1-7ccdc1f03542"/>
<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">
<datasetRun subDataset="dataset1" uuid="55af5621-ba24-4f19-8c1d-496627ce93c6">
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.JREmptyDataSource(1)]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="88" width="797">
<staticText>
<reportElement x="22" y="0" width="100" height="20" uuid="3a8c6a5e-2337-40b6-9464-984655b240c1"/>
<text><![CDATA[Parent List]]></text>
</staticText>
<staticText>
<reportElement x="186" y="0" width="100" height="20" uuid="3961e703-a32a-4c98-98fc-5b5fd745962a"/>
<text><![CDATA[Parent List]]></text>
</staticText>
<staticText>
<reportElement x="350" y="0" width="100" height="20" uuid="c75ef0b2-9d7b-4d53-89a9-60407300b1f5"/>
<text><![CDATA[Parent List]]></text>
</staticText>
<componentElement>
<reportElement x="0" y="20" width="797" height="26" uuid="3a0c69f8-788d-4e30-b9ab-3a5a7e6847b2"/>
<jr:list>
<datasetRun subDataset="dataset2" uuid="109058e7-c925-4ab2-ae35-4d71a8868623">
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.JREmptyDataSource(1)]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="26" width="797">
<staticText>
<reportElement x="20" y="4" width="100" height="20" uuid="528cdfee-2066-4c73-bfa4-01c71368e999"/>
<text><![CDATA[child List]]></text>
</staticText>
<staticText>
<reportElement x="190" y="4" width="100" height="20" uuid="3187542d-7f8d-4770-9d84-0a0a5ee2c841"/>
<text><![CDATA[Child List]]></text>
</staticText>
</jr:listContents>
</jr:list>
</componentElement>
<staticText>
<reportElement x="24" y="52" width="100" height="20" uuid="83d4dfff-8142-4e20-a929-e37a23ea2c20"/>
<text><![CDATA[Total]]></text>
</staticText>
</jr:listContents>
</jr:list>
</componentElement>
</band>
</detail>
<columnFooter>
<band height="45" splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band height="54" splitType="Stretch"/>
</pageFooter>
<summary>
<band height="42" splitType="Stretch"/>
</summary>
</jasperReport>
Если вы все еще сталкиваетесь с проблемой, попробуйте предоставить образец JRXML вашего отчета. – Viki888
@ Viki888 Я добавил jrxml, пожалуйста, изучая его. Спасибо – sharief