2017-10-24 10 views
1

목차 페이지 인 두 개의 열이있는 페이지가 있으며 첫 번째와 두 번째 열의 레벨 값에 따라 책갈피를 인쇄하려고합니다. 문제는 인쇄 순서가 vertical으로 설정되었지만 jasper가 첫 번째 열을 완료하면 두 번째 열의 시작 부분부터 시작하지 않지만 열의 끝에 씁니다.페이지의 두 번째 열의 첫 번째 줄에 텍스트 필드를 인쇄하는 방법은 무엇입니까?

Is situation 그림에서 알 수 있듯이 두 번째 줄의 시작 부분에 노란색 사각형이있는 문장이 있어야합니다.

jrxml

I는 다음 2 프레임의 좌측에 다른 하나는 다른 하나의 필드를 넣어 I 단지 하나의 열을 가진 페이지를 생성 할뿐만 아니라 다른 방법을 시도
<?xml version="1.0" encoding="UTF-8"?> 
<!-- Created with Jaspersoft Studio version 6.4.0.final using JasperReports  Library version 6.4.1 --> 
<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="Blank_A4_Landscape" columnCount="2" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="400" columnSpacing="2" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="b0cd6df7-ceab-4f93-aff6-668d7c75ce9b"> 
<property name="com.jaspersoft.studio.data.sql.tables" value=""/> 
<parameter name="resourcePath" class="java.lang.String" isForPrompting="false"> 
    <defaultValueExpression><![CDATA[""]]></defaultValueExpression> 
</parameter> 
<parameter name="Einrichtungspseudonym" class="java.lang.String" isForPrompting="false"> 
    <defaultValueExpression><![CDATA["Einrichtungspseudonym"]]></defaultValueExpression> 
</parameter> 
<parameter name="reportPart" class="java.lang.String" isForPrompting="false"> 
    <defaultValueExpression><![CDATA["reportPart"]]></defaultValueExpression> 
</parameter> 
<queryString language="SQL"> 
    <![CDATA[]]> 
</queryString> 
<field name="level" class="java.lang.Integer"/> 
<field name="label" class="java.lang.String"/> 
<field name="pageIndex" class="java.lang.Integer"/> 
<background> 
    <band splitType="Stretch"/> 
</background> 
<pageHeader> 
    <band height="50" splitType="Stretch"> 
     <frame> 
      <reportElement x="0" y="0" width="702" height="50" backcolor="rgba(227, 218, 218, 0.46666667)" uuid="6ca5e261-9531-43ef-80ed-828dc6b4524f"/> 
      <rectangle> 
       <reportElement x="0" y="18" width="702" height="17" forecolor="#A1A1A1" backcolor="#D9D9D9" uuid="54beea72-4243-48ea-856e-29d9da8a0431"> 
        <property name="com.jaspersoft.studio.unit.height" value="cm"/> 
       </reportElement> 
       <graphicElement> 
        <pen lineWidth="0.5" lineStyle="Solid"/> 
       </graphicElement> 
      </rectangle> 
      <textField isStretchWithOverflow="true"> 
       <reportElement style="Kopfzeile" x="2" y="0" width="330" height="50" uuid="f9f8c8d7-253c-46bd-b8ab-fe737db7070d"/> 
       <textFieldExpression><![CDATA["Tabellen- und Abbildungsverzeichnis"]]></textFieldExpression> 
       <anchorNameExpression><![CDATA["Tabellen- und Abbildungsverzeichnis"]]></anchorNameExpression> 
      </textField> 
      <image> 
       <reportElement x="632" y="0" width="70" height="50" uuid="16558eec-b7b6-4fc4-b6ea-6fb3ff4b5e2f"/> 
       <imageExpression><![CDATA[$P{resourcePath}+"Logo_vertical_RGB.png"]]></imageExpression> 
      </image> 
     </frame> 
    </band> 
</pageHeader> 
<columnHeader> 
    <band height="20" splitType="Stretch"> 
     <textField isStretchWithOverflow="true"> 
      <reportElement style="Kapitelüberschrift" isPrintRepeatedValues="false" x="0" y="0" width="394" height="20" uuid="2d7b27c2-91b1-4d62-97b6-ca0d4dd1c099"/> 
      <textFieldExpression><![CDATA["Tabellen- und Abbildungsverzechnis"]]></textFieldExpression> 
     </textField> 
     <textField isStretchWithOverflow="true"> 
      <reportElement style="Kapitelüberschrift" isPrintRepeatedValues="false" x="412" y="0" width="388" height="20" uuid="edc812df-deaa-4511-9b46-1c5c963b31a9"/> 
      <textFieldExpression><![CDATA["Abbildungen der Ergebniszusammenfassung"]]></textFieldExpression> 
     </textField> 
    </band> 
</columnHeader> 
<detail> 
    <band height="113" splitType="Stretch"> 
     <frame> 
      <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="411" y="3" width="340" height="17" isRemoveLineWhenBlank="true" uuid="517ee347-d843-43d4-9855-b4c1cc6b490c"> 
       <printWhenExpression><![CDATA[$F{level} == 21]]></printWhenExpression> 
      </reportElement> 
      <rectangle> 
       <reportElement stretchType="ContainerHeight" x="0" y="0" width="11" height="17" isRemoveLineWhenBlank="true" forecolor="#E8A435" backcolor="#FCCF3A" uuid="3a9abeb8-b2a9-4650-b034-9eb7815e7f09"> 
        <property name="com.jaspersoft.studio.unit.height" value="cm"/> 
       </reportElement> 
       <graphicElement> 
        <pen lineWidth="0.0" lineStyle="Solid"/> 
       </graphicElement> 
      </rectangle> 
      <textField isStretchWithOverflow="true" hyperlinkType="LocalAnchor"> 
       <reportElement style="Standard" x="20" y="0" width="290" height="17" isRemoveLineWhenBlank="true" uuid="f96bf175-4d0f-494f-8eb6-ac9270a53ec5"/> 
       <textElement textAlignment="Left"/> 
       <textFieldExpression><![CDATA[$F{label}]]></textFieldExpression> 
       <hyperlinkAnchorExpression><![CDATA[$F{label}]]></hyperlinkAnchorExpression> 
      </textField> 
      <textField isStretchWithOverflow="true"> 
       <reportElement key="" style="Standard" x="310" y="0" width="30" height="17" isRemoveLineWhenBlank="true" uuid="eadc2beb-1873-44a7-b8ca-26815fc64601"/> 
       <textElement textAlignment="Right"/> 
       <textFieldExpression><![CDATA[$V{PAGE_NUMBER} + $F{pageIndex} + 4]]></textFieldExpression> 
      </textField> 
     </frame> 
     <frame> 
      <reportElement isPrintRepeatedValues="false" x="0" y="3" width="351" height="110" isRemoveLineWhenBlank="true" uuid="f7f28f9f-f011-42c5-b10b-68986a90ce92"> 
       <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.FreeLayout"/> 
      </reportElement> 
      <frame> 
       <reportElement positionType="Float" x="0" y="0" width="351" height="18" isRemoveLineWhenBlank="true" uuid="870d4b8e-dcf2-40dc-8c1a-4e77b878b898"> 
        <printWhenExpression><![CDATA[$F{level} == 31]]></printWhenExpression> 
       </reportElement> 
       <textField isStretchWithOverflow="true" hyperlinkType="LocalAnchor"> 
        <reportElement style="Standard_mit_html" mode="Transparent" x="20" y="0" width="301" height="18" isRemoveLineWhenBlank="true" uuid="6fee51d3-a833-48e2-8eba-72228aeb58d7"> 
         <property name="local_mesure_unitheight" value="pixel"/> 
         <property name="com.jaspersoft.studio.unit.height" value="px"/> 
         <property name="com.jaspersoft.studio.unit.y" value="px"/> 
        </reportElement> 
        <box> 
         <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> 
         <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> 
         <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> 
         <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> 
        </box> 
        <textElement textAlignment="Left" markup="styled"/> 
        <textFieldExpression><![CDATA[$F{label}]]></textFieldExpression> 
        <hyperlinkAnchorExpression><![CDATA[$F{label}]]></hyperlinkAnchorExpression> 
       </textField> 
       <textField isStretchWithOverflow="true"> 
        <reportElement style="Standard" x="321" y="0" width="30" height="18" isRemoveLineWhenBlank="true" uuid="5868d8c8-7eb1-495b-b848-a193237679a2"> 
         <property name="com.jaspersoft.studio.unit.y" value="cm"/> 
        </reportElement> 
        <textElement textAlignment="Right"/> 
        <textFieldExpression><![CDATA[6]]></textFieldExpression> 
       </textField> 
       <rectangle> 
        <reportElement stretchType="ContainerHeight" x="0" y="0" width="11" height="18" isRemoveLineWhenBlank="true" forecolor="#5A49F2" backcolor="#783AFC" uuid="f52cbdd2-131c-4726-9945-dea36bb1275c"> 
         <property name="com.jaspersoft.studio.unit.height" value="cm"/> 
        </reportElement> 
        <graphicElement> 
         <pen lineWidth="0.0" lineStyle="Solid"/> 
        </graphicElement> 
       </rectangle> 
      </frame> 
      <frame> 
       <reportElement positionType="Float" x="0" y="18" width="351" height="18" isRemoveLineWhenBlank="true" uuid="429e6789-ec18-4e23-b84a-ddff038ddf31"> 
        <printWhenExpression><![CDATA[$F{level} == 32]]></printWhenExpression> 
       </reportElement> 
       <textField isStretchWithOverflow="true" hyperlinkType="LocalAnchor"> 
        <reportElement style="Standard_mit_html" mode="Transparent" x="20" y="8" width="301" height="10" isRemoveLineWhenBlank="true" uuid="3e6b8d9c-94e8-47eb-b1ca-926607daf19e"> 
         <property name="local_mesure_unitheight" value="pixel"/> 
         <property name="com.jaspersoft.studio.unit.height" value="px"/> 
         <property name="com.jaspersoft.studio.unit.y" value="px"/> 
        </reportElement> 
        <box> 
         <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> 
         <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> 
         <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> 
         <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> 
        </box> 
        <textElement textAlignment="Left" markup="styled"/> 
        <textFieldExpression><![CDATA[$F{label}]]></textFieldExpression> 
        <hyperlinkAnchorExpression><![CDATA[$F{label}]]></hyperlinkAnchorExpression> 
       </textField> 
       <textField isStretchWithOverflow="true"> 
        <reportElement style="Standard" x="321" y="8" width="30" height="10" isRemoveLineWhenBlank="true" uuid="45cb3231-65b2-4b03-8387-cb67d968d4de"> 
         <property name="com.jaspersoft.studio.unit.y" value="cm"/> 
        </reportElement> 
        <textElement textAlignment="Right"/> 
        <textFieldExpression><![CDATA[6]]></textFieldExpression> 
       </textField> 
       <rectangle> 
        <reportElement stretchType="ContainerHeight" x="0" y="8" width="11" height="10" isRemoveLineWhenBlank="true" forecolor="#1BAEF7" backcolor="#56B4FC" uuid="8f7cd5e1-539e-455d-992d-7754d5b50aef"> 
         <property name="com.jaspersoft.studio.unit.height" value="cm"/> 
        </reportElement> 
        <graphicElement> 
         <pen lineWidth="0.0" lineStyle="Solid"/> 
        </graphicElement> 
       </rectangle> 
      </frame> 
     </frame> 
    </band> 
</detail> 
<pageFooter> 
    <band height="31" splitType="Stretch"> 
     <frame> 
      <reportElement x="0" y="0" width="802" height="31" uuid="99847b36-f679-406b-b7c6-44151acc24e4"> 
       <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> 
      </reportElement> 
      <textField isStretchWithOverflow="true"> 
       <reportElement style="Fußzeile 8,5pt" x="0" y="0" width="394" height="31" uuid="5d388cd5-181d-48b6-981a-9034f2ca3edf"/> 
       <textElement verticalAlignment="Bottom"/> 
       <textFieldExpression><![CDATA["© report: Quartalsbericht "+$P{reportPart}+" für Einrichtung "+$P{Einrichtungspseudonym}]]></textFieldExpression> 
      </textField> 
      <textField isStretchWithOverflow="true" evaluationTime="Master"> 
       <reportElement style="Fußzeile 8,5pt" x="408" y="0" width="394" height="31" uuid="4efe47cc-4b4c-415a-9c38-1cfabd3c347d"> 
        <property name="com.jaspersoft.studio.unit.x" value="cm"/> 
       </reportElement> 
       <textElement textAlignment="Right" verticalAlignment="Bottom"/> 
       <textFieldExpression><![CDATA[$V{MASTER_CURRENT_PAGE} != null ? $V{MASTER_CURRENT_PAGE}+"/"+$V{MASTER_TOTAL_PAGES} : $V{PAGE_NUMBER}]]></textFieldExpression> 
      </textField> 
     </frame> 
    </band> 
</pageFooter> 

페이지의 쓰기면에. 그러나 그 결과는 기존 접근 방식과 동일합니다. 단일 열 페이지 코드 : 첫 번째 시도에

<?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="Abbildungsverzeichnis" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="AllSectionsNoDetail" columnWidth="702" leftMargin="70" rightMargin="70" topMargin="42" bottomMargin="42" whenResourceMissingType="Empty" uuid="6e74177b-d551-4a75-ae51-6cdde3f284ce"> 
<property name="com.jaspersoft.studio.unit." value="cm"/> 
<property name="net.sf.jasperreports.print.create.bookmarks" value="false"/> 
<template><![CDATA[$P{resourcePath}+"styles.jrtx"]]></template> 
<parameter name="resourcePath" class="java.lang.String" isForPrompting="false"> 
    <defaultValueExpression><![CDATA[""]]></defaultValueExpression> 
</parameter> 
<parameter name="Einrichtungspseudonym" class="java.lang.String" isForPrompting="false"> 
    <defaultValueExpression><![CDATA["Einrichtungspseudonym"]]></defaultValueExpression> 
</parameter> 
<parameter name="Berichtsquartal" class="java.lang.String" isForPrompting="false"> 
    <defaultValueExpression><![CDATA["Berichtsquartal"]]></defaultValueExpression> 
</parameter> 
<queryString language="XPath"> 
    <![CDATA[/QSDialyse2018QuartalsberichtLe]]> 
</queryString> 
<field name="level" class="java.lang.Integer"/> 
<field name="label" class="java.lang.String"/> 
<field name="pageIndex" class="java.lang.Integer"/> 
<background> 
    <band splitType="Stretch"/> 
</background> 
<pageHeader> 
    <band height="50"> 
     <frame> 
      <reportElement x="0" y="0" width="702" height="50" backcolor="rgba(227, 218, 218, 0.46666667)" uuid="06038290-751d-4458-807d-96a3e51e7d1d"/> 
      <rectangle> 
       <reportElement x="0" y="18" width="702" height="17" forecolor="#A1A1A1" backcolor="#D9D9D9" uuid="ca066fcc-d491-4f4b-aa09-17ae01773098"> 
        <property name="com.jaspersoft.studio.unit.height" value="cm"/> 
       </reportElement> 
       <graphicElement> 
        <pen lineWidth="0.5" lineStyle="Solid"/> 
       </graphicElement> 
      </rectangle> 
      <textField isStretchWithOverflow="true"> 
       <reportElement style="Kopfzeile" x="2" y="0" width="330" height="50" uuid="4a0983f4-b41e-4828-a73d-7e285cb31887"/> 
       <textFieldExpression><![CDATA["Tabellen- und Abbildungsverzeichnis"]]></textFieldExpression> 
       <anchorNameExpression><![CDATA["Tabellen- und Abbildungsverzeichnis"]]></anchorNameExpression> 
      </textField> 
     </frame> 
    </band> 
</pageHeader> 
<detail> 
    <band height="110" splitType="Stretch"> 
     <property name="local_mesure_unitheight" value="pixel"/> 
     <property name="com.jaspersoft.studio.unit.height" value="px"/> 
     <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.FreeLayout"/> 
     <frame> 
      <reportElement isPrintRepeatedValues="false" x="0" y="0" width="351" height="110" isRemoveLineWhenBlank="true" uuid="c5f75321-dadb-4152-acab-6208ed6878de"> 
       <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.FreeLayout"/> 
      </reportElement> 
      <frame> 
       <reportElement positionType="Float" isPrintRepeatedValues="false" x="0" y="0" width="351" height="18" isRemoveLineWhenBlank="true" uuid="a3604c51-5a78-4577-b0f8-2cc19c403996"> 
        <printWhenExpression><![CDATA[$F{level} == 31]]></printWhenExpression> 
       </reportElement> 
       <textField isStretchWithOverflow="true" hyperlinkType="LocalAnchor"> 
        <reportElement style="Standard_mit_html" isPrintRepeatedValues="false" mode="Transparent" x="20" y="0" width="301" height="18" isRemoveLineWhenBlank="true" uuid="379fcff2-021d-4761-a89a-eeb772723b1b"> 
         <property name="local_mesure_unitheight" value="pixel"/> 
         <property name="com.jaspersoft.studio.unit.height" value="px"/> 
         <property name="com.jaspersoft.studio.unit.y" value="px"/> 
        </reportElement> 
        <box> 
         <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> 
         <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> 
         <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> 
         <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> 
        </box> 
        <textElement textAlignment="Left" markup="styled"/> 
        <textFieldExpression><![CDATA[$F{label}]]></textFieldExpression> 
        <hyperlinkAnchorExpression><![CDATA[$F{label}]]></hyperlinkAnchorExpression> 
       </textField> 
       <textField isStretchWithOverflow="true"> 
        <reportElement style="Standard" x="321" y="0" width="30" height="18" isRemoveLineWhenBlank="true" uuid="207a4316-1f91-4886-91f9-9a86c788a83f"> 
         <property name="com.jaspersoft.studio.unit.y" value="cm"/> 
        </reportElement> 
        <textElement textAlignment="Right"/> 
        <textFieldExpression><![CDATA[$V{PAGE_NUMBER} + $F{pageIndex} + 4]]></textFieldExpression> 
       </textField> 
       <rectangle> 
        <reportElement stretchType="ContainerHeight" x="0" y="0" width="11" height="18" isRemoveLineWhenBlank="true" forecolor="#5A49F2" backcolor="#783AFC" uuid="f9a97c9f-4bc7-4ede-b082-d39a697f10ec"> 
         <property name="com.jaspersoft.studio.unit.height" value="cm"/> 
        </reportElement> 
        <graphicElement> 
         <pen lineWidth="0.0" lineStyle="Solid"/> 
        </graphicElement> 
       </rectangle> 
      </frame> 
      <frame> 
       <reportElement positionType="Float" isPrintRepeatedValues="false" x="0" y="18" width="351" height="18" isRemoveLineWhenBlank="true" uuid="c01291d6-8266-4368-bd93-8a9dc0b52770"> 
        <printWhenExpression><![CDATA[$F{level} == 32]]></printWhenExpression> 
       </reportElement> 
       <textField isStretchWithOverflow="true" hyperlinkType="LocalAnchor"> 
        <reportElement style="Standard_mit_html" isPrintRepeatedValues="false" mode="Transparent" x="20" y="8" width="301" height="10" isRemoveLineWhenBlank="true" uuid="8213d17a-5e7d-4fd2-81b2-509045752b80"> 
         <property name="local_mesure_unitheight" value="pixel"/> 
         <property name="com.jaspersoft.studio.unit.height" value="px"/> 
         <property name="com.jaspersoft.studio.unit.y" value="px"/> 
        </reportElement> 
        <textElement textAlignment="Left" markup="styled"/> 
        <textFieldExpression><![CDATA[$F{label}]]></textFieldExpression> 
        <hyperlinkAnchorExpression><![CDATA[$F{label}]]></hyperlinkAnchorExpression> 
       </textField> 
       <textField isStretchWithOverflow="true"> 
        <reportElement style="Standard" x="321" y="8" width="30" height="10" isRemoveLineWhenBlank="true" uuid="1ced4974-5ea1-4ef1-86cb-dfd3fa5bd736"> 
         <property name="com.jaspersoft.studio.unit.y" value="cm"/> 
        </reportElement> 
        <textElement textAlignment="Right"/> 
        <textFieldExpression><![CDATA[$V{PAGE_NUMBER} + $F{pageIndex} + 4]]></textFieldExpression> 
       </textField> 
       <rectangle> 
        <reportElement stretchType="ContainerHeight" x="0" y="8" width="11" height="10" isRemoveLineWhenBlank="true" forecolor="#1BAEF7" backcolor="#56B4FC" uuid="ee55c1ea-8c69-45ae-86d8-6166dcddb18b"> 
         <property name="com.jaspersoft.studio.unit.height" value="cm"/> 
        </reportElement> 
        <graphicElement> 
         <pen lineWidth="0.0" lineStyle="Solid"/> 
        </graphicElement> 
       </rectangle> 
      </frame> 


     </frame> 
     <frame> 
      <reportElement isPrintRepeatedValues="false" x="362" y="0" width="340" height="17" isRemoveLineWhenBlank="true" uuid="d1247e47-59b4-4930-ad78-c76a0374f555"> 
       <property name="ShowOutOfBoundContent" value="false"/> 
       <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.FreeLayout"/> 
       <printWhenExpression><![CDATA[$F{level} == 21]]></printWhenExpression> 
      </reportElement> 
      <rectangle> 
       <reportElement stretchType="ContainerHeight" x="5" y="0" width="11" height="17" isRemoveLineWhenBlank="true" forecolor="#E8A435" backcolor="#FCCF3A" uuid="38bc71e5-6d69-4ab3-8a6b-0c1bba53a26c"> 
        <property name="com.jaspersoft.studio.unit.height" value="cm"/> 
       </reportElement> 
       <graphicElement> 
        <pen lineWidth="0.0" lineStyle="Solid"/> 
       </graphicElement> 
      </rectangle> 
      <textField isStretchWithOverflow="true" hyperlinkType="LocalAnchor"> 
       <reportElement style="Standard" x="20" y="0" width="290" height="17" isRemoveLineWhenBlank="true" uuid="b19a02f7-3d3f-4086-86ed-5dc6859e5fd1"/> 
       <textElement textAlignment="Left"/> 
       <textFieldExpression><![CDATA[$F{label}]]></textFieldExpression> 
       <hyperlinkAnchorExpression><![CDATA[$F{label}]]></hyperlinkAnchorExpression> 
      </textField> 
      <textField isStretchWithOverflow="true"> 
       <reportElement key="" style="Standard" x="310" y="0" width="30" height="17" isRemoveLineWhenBlank="true" uuid="bc43bd36-7466-457c-95e6-384410c05cbe"/> 
       <textElement textAlignment="Right"/> 
       <textFieldExpression><![CDATA[$V{PAGE_NUMBER} + $F{pageIndex} + 4]]></textFieldExpression> 
      </textField> 
     </frame> 
    </band> 
</detail> 
<pageFooter> 
    <band height="31"> 
     <frame> 
      <reportElement x="0" y="0" width="702" height="31" uuid="ca4af90c-cc2f-406c-865f-59680b968139"> 
       <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> 
      </reportElement> 
      <textField isStretchWithOverflow="true"> 
       <reportElement style="Fußzeile 8,5pt" x="0" y="0" width="351" height="31" uuid="c3e365c7-5dde-419e-a0da-950bf7d16710"/> 
       <textElement verticalAlignment="Bottom"/> 
       <textFieldExpression><![CDATA["© report: Quartalsbericht "+$P{Berichtsquartal}+" für Einrichtung "+$P{Einrichtungspseudonym}]]></textFieldExpression> 
      </textField> 
      <textField isStretchWithOverflow="true" evaluationTime="Master"> 
       <reportElement style="Fußzeile 8,5pt" x="351" y="0" width="351" height="31" uuid="94da8446-69d3-4dc9-a791-d413082e42cc"> 
        <property name="com.jaspersoft.studio.unit.x" value="cm"/> 
       </reportElement> 
       <textElement textAlignment="Right" verticalAlignment="Bottom"/> 
       <textFieldExpression><![CDATA[$V{MASTER_CURRENT_PAGE} != null ? $V{MASTER_CURRENT_PAGE}+"/"+$V{MASTER_TOTAL_PAGES} : $V{PAGE_NUMBER}]]></textFieldExpression> 
      </textField> 
     </frame> 
    </band> 
</pageFooter> 

답변

2

관련, 당신은 어떻게 여러 열 페이지 작업을 오해했다. 이 중단됩니다 수직 경우 페이지의 끝을 명중하거나 수동으로 열을 발견하면 필드가 적절하게 배치하여, 이동되는 열에서 당신은 결정하지 않는

대신 재 스퍼 보고서는 printOrder에 따라 다음 열로 분해됩니다

<break type="Column"> 
    <reportElement x="0" y="15" width="100" height="1" uuid="c082e856-5507-4b0f-9dde-01b7fac85a4f"/> 
</break> 

이 솔루션은 당신이 그렇지 않은 경우 첫 번째 부분은, 페이지에 첫 번째 열에 맞게 유지하는 경우 가능하다

휴식 수동 열이 여러 열을 사용하여 그룹을 통해 또는 중 휴식 두 번째 열에서 오버플로되고 열이 끊어지면 페이지가 끊깁니다.

해결 방법은 위의 예와 같이 데이터를 정렬 한 다음 위의 예와 같이 수동 열 나누기를 추가하여 그룹화하는 것입니다. 평판 인 경우 예

(이 question에서 데이터 소스를 사용하여) 새로운 열로 분해 미만 100.000

<?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="2columnsbreak" columnCount="2" pageWidth="595" pageHeight="842" columnWidth="277" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="81a13ec8-f22d-44f0-9335-c15e2fe28614"> 
    <property name="com.jaspersoft.studio.data.defaultdataadapter" value="CVS"/> 
    <queryString language="csv"> 
     <![CDATA[]]> 
    </queryString> 
    <field name="User" class="java.lang.String"/> 
    <field name="Rep" class="java.lang.Integer"/> 
    <group name="UserWithLowRep" isStartNewColumn="true"> 
     <groupExpression><![CDATA[($F{Rep}<100000)]]></groupExpression> 
    </group> 
    <columnHeader> 
     <band height="24" splitType="Stretch"> 
      <textField evaluationTime="Group" evaluationGroup="UserWithLowRep"> 
       <reportElement x="0" y="0" width="270" height="20" uuid="456c89e2-8e48-4e01-95ff-e56f2b150e0f"/> 
       <textFieldExpression><![CDATA[($V{COLUMN_NUMBER}==1?"User with high rep":"User with low rep")]]></textFieldExpression> 
      </textField> 
     </band> 
    </columnHeader> 
    <detail> 
     <band height="23" splitType="Stretch"> 
      <textField> 
       <reportElement x="0" y="0" width="270" height="20" uuid="2daf5f8f-87a1-4f7e-b1de-2807811a1ddd"/> 
       <textFieldExpression><![CDATA[$F{User}]]></textFieldExpression> 
      </textField> 
     </band> 
    </detail> 
</jasperReport> 

을 변경할 때 groupExpression 새로운 열로 분해 할 출력

당신이 컬럼에 따라 원하는대로 출력 포맷 데이터, 내장 variabile $V{COLUMN_NUMBER} 사용 방법 0

example

참고. 이 예에서는 2 열의 값이 1 (첫 번째 열에는 데이터) 또는 2 (두 번째 열에있는 데이터)입니다.