Я создаю каталог деталей, который имеет 5 столбцов и 5 строк на каждой странице.
Разделы открывают новую страницу, а категории должны начинать новую строку.
Проблема заключается в том, когдаизменения категории, я не могу заставить его начать новую строку (например, с первой группой только 7 компонентов, вторая группа должна начинаться с третьей строки.) Я отметил начало нового столбца, но он работает так же, как началоновая страница, она ломает страницу, а не строку, как я надеялся. Ниже я ставлю код:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.8.0.final using JasperReports Library version 6.8.0-2ed8dfabb690ff337a5797129f2cd92902b0c87b -->
<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="lastversion" columnCount="5" printOrder="Horizontal" pageWidth="595" pageHeight="842" columnWidth="111" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" isFloatColumnFooter="true" uuid="0e16dee2-73dc-4696-a7f9-60f6e561852d">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="newEXCELfile"/>
<property name="com.jaspersoft.studio.unit." value="pixel"/>
<property name="com.jaspersoft.studio.unit.pageHeight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.pageWidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.topMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.bottomMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.leftMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.rightMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.columnWidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/>
<queryString language="XLS">
<![CDATA[]]>
</queryString>
<field name="code_product" class="java.lang.String"/>
<field name="desc_product" class="java.lang.String"/>
<field name="desc_section" class="java.lang.String"/>
<field name="groupdetail" class="java.math.BigDecimal"/>
<field name="desc_category" class="java.lang.String"/>
<variable name="imagefile" class="java.lang.String">
<variableExpression><![CDATA["//wms-fp1/data/general/DatabaseWMS/files/product/"]]></variableExpression>
</variable>
<group name="desc_category" isStartNewColumn="true">
<groupExpression><![CDATA[$F{desc_category}]]></groupExpression>
</group>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band splitType="Stretch"/>
</title>
<pageHeader>
<band splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band splitType="Stretch"/>
</columnHeader>
<detail>
<band height="170" splitType="Immediate">
<printWhenExpression><![CDATA[new Boolean($F{groupdetail}.intValue()!=2)]]></printWhenExpression>
<textField>
<reportElement x="0" y="140" width="113" height="30" uuid="7f7bd965-2976-4ed5-8244-4aae72cccc8d"/>
<textElement textAlignment="Center">
<font fontName="AvantGarde Bk BT" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{desc_product}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="120" width="113" height="20" uuid="d8df6970-301f-4d34-beb3-49a2b1343499"/>
<textElement textAlignment="Center">
<font fontName="AvantGarde Bk BT" size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{code_product}]]></textFieldExpression>
</textField>
<image onErrorType="Blank">
<reportElement x="2" y="19" width="111" height="97" uuid="726193f4-88b1-4903-954c-fbdade9c5204">
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<imageExpression><![CDATA[$V{imagefile}+$F{code_product}+".jpg"]]></imageExpression>
</image>
</band>
</detail>
<columnFooter>
<band splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band splitType="Stretch"/>
</pageFooter>
<summary>
<band splitType="Stretch"/>
</summary>
</jasperReport>