电影内容到新页面 Jasper Report

问题描述 投票:0回答:0

下面的代码允许您查看 Jasper 报告。我想将

<detail>
标签的内容移动到下一页,方法是将它放在顶部。我该怎么做?

report.jrxml

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.17.0.final using JasperReports Library version 6.17.0-6d93193241dd8cc42629e188b94f9e0bc5722efd  -->
<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="reportpreventivo" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="3c08ffac-5031-449c-a58f-007dffeebf2f">
    <import value="org.apache.commons.codec.binary.Base64"/>
    <style name="Table_TH" mode="Opaque" backcolor="#FFFFFF">
        <box>
            <pen lineWidth="0.5" lineColor="#000000"/>
            <topPen lineWidth="0.5" lineColor="#000000"/>
            <leftPen lineWidth="0.5" lineColor="#000000"/>
            <bottomPen lineWidth="0.5" lineColor="#000000"/>
            <rightPen lineWidth="0.5" lineColor="#000000"/>
        </box>
    </style>
    <style name="Table_CH" mode="Opaque" backcolor="#FFFFFF">
        <box>
            <pen lineWidth="0.5" lineColor="#000000"/>
            <topPen lineWidth="0.5" lineColor="#000000"/>
            <leftPen lineWidth="0.5" lineColor="#000000"/>
            <bottomPen lineWidth="0.5" lineColor="#000000"/>
            <rightPen lineWidth="0.5" lineColor="#000000"/>
        </box>
    </style>
    <style name="Table_TD" mode="Opaque" backcolor="#FFFFFF">
        <box>
            <pen lineWidth="0.5" lineColor="#000000"/>
            <topPen lineWidth="0.5" lineColor="#000000"/>
            <leftPen lineWidth="0.5" lineColor="#000000"/>
            <bottomPen lineWidth="0.5" lineColor="#000000"/>
            <rightPen lineWidth="0.5" lineColor="#000000"/>
        </box>
    </style>
    <subDataset name="DataSetHeader" uuid="db6131ae-8b7b-429e-aaca-42479bc8befd">
        <parameter name="Data" class="java.lang.String">
            <parameterDescription><![CDATA[Data del preventivo]]></parameterDescription>
        </parameter>
        <parameter name="NRPreventivo" class="java.lang.String"/>
        <parameter name="NSRif" class="java.lang.String"/>
        <parameter name="Titolo" class="java.lang.String"/>
        <parameter name="RagioneSociale" class="java.lang.String"/>
        <parameter name="Oggetto" class="java.lang.String"/>
        <parameter name="Testata" class="java.lang.String"/>
        <parameter name="LogoBase64" class="java.lang.String"/>
        <queryString>
            <![CDATA[]]>
        </queryString>
        <field name="Data" class="java.lang.String"/>
        <field name="NSRif" class="java.lang.String"/>
        <field name="VSRif" class="java.lang.String"/>
        <field name="NRPreventivo" class="java.lang.String"/>
        <field name="Titolo" class="java.lang.String"/>
        <field name="RagioneSociale" class="java.lang.String"/>
        <field name="Testata" class="java.lang.String"/>
        <field name="Oggetto" class="java.lang.String"/>
        <field name="LogoBase64" class="java.lang.String"/>
        <variable name="Logo" class="java.lang.String"/>
    </subDataset>
    <subDataset name="DataSetCapitoli" uuid="489c728f-7f51-418b-8b97-9731eb99a3df">
        <queryString>
            <![CDATA[]]>
        </queryString>
        <field name="NomeCapitolo" class="java.lang.String"/>
        <field name="Descrizione" class="java.lang.String"/>
        <field name="Immagine" class="java.lang.String"/>
        <field name="NomeBreve" class="java.lang.String"/>
        <field name="Costo" class="java.lang.Double"/>
        <field name="Quantita" class="java.lang.Double"/>
    </subDataset>
    <parameter name="Data" class="java.lang.String"/>
    <parameter name="NRPreventivo" class="java.lang.String"/>
    <parameter name="NSRif" class="java.lang.String"/>
    <parameter name="VSRif" class="java.lang.String"/>
    <parameter name="Titolo" class="java.lang.String"/>
    <parameter name="RagioneSociale" class="java.lang.String">
        <parameterDescription><![CDATA[]]></parameterDescription>
    </parameter>
    <parameter name="Indirizzo" class="java.lang.String"/>
    <parameter name="Citta" class="java.lang.String"/>
    <parameter name="Oggetto" class="java.lang.String"/>
    <parameter name="Testata" class="java.lang.String"/>
    <parameter name="LogoBase64" class="java.lang.String"/>
    <queryString>
        <![CDATA[]]>
    </queryString>
    <background>
        <band splitType="Stretch"/>
    </background>
    <title>
        <band height="79" splitType="Stretch">
            <image scaleImage="FillFrame">
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="560" height="79" uuid="7fe6f2e0-3ba7-4424-9383-8d78bfe1cc21"/>
                <imageExpression><![CDATA[$P{LogoBase64}]]></imageExpression>
            </image>
        </band>
    </title>
    <columnHeader>
        <band height="430" splitType="Stretch">
            <staticText>
                <reportElement x="50" y="15" width="40" height="30" uuid="801816f2-1988-4b9e-9291-88d5a200d238"/>
                <textElement>
                    <font size="12"/>
                </textElement>
                <text><![CDATA[Data:]]></text>
            </staticText>
            <textField>
                <reportElement x="90" y="15" width="100" height="30" uuid="29f6924b-5bd2-42f1-bd98-0090aed0d3eb"/>
                <textElement>
                    <font size="12"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{Data}]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement x="50" y="50" width="90" height="30" uuid="c59e786f-e907-4bcd-93f3-a14d0b777d5c"/>
                <textElement>
                    <font size="12"/>
                </textElement>
                <text><![CDATA[Nr Preventivo:]]></text>
            </staticText>
            <textField>
                <reportElement x="140" y="50" width="100" height="30" uuid="b0632e23-c54a-4edc-a264-23055af446a5"/>
                <textElement>
                    <font size="12"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{NRPreventivo}]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement x="50" y="80" width="90" height="30" uuid="c5dbd3b3-7263-43d5-a804-1a797635fe8a"/>
                <textElement>
                    <font size="12"/>
                </textElement>
                <text><![CDATA[Nf.Rif:]]></text>
            </staticText>
            <textField>
                <reportElement x="140" y="80" width="100" height="30" uuid="1a11a6cc-5d1b-4994-bf10-3cc1de504d07"/>
                <textElement>
                    <font size="12"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{NSRif}]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement x="50" y="110" width="90" height="30" uuid="dc708ab1-3286-479d-ad0b-aaea351652b4"/>
                <textElement>
                    <font size="12"/>
                </textElement>
                <text><![CDATA[Vs.Rif:]]></text>
            </staticText>
            <textField>
                <reportElement x="140" y="110" width="100" height="30" uuid="aac1e4b6-da6a-4e46-aa0f-c026896a3b86"/>
                <textElement>
                    <font size="12"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{VSRif}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="380" y="15" width="100" height="25" uuid="7231c72c-d715-4bbe-8906-a27173f77220"/>
                <textElement>
                    <font size="12"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{Titolo}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="380" y="50" width="170" height="30" uuid="caf5fd23-70c3-46d3-9de0-c5765c1ec5fc"/>
                <textElement>
                    <font size="12"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{RagioneSociale}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="380" y="80" width="170" height="30" uuid="ec9b01f4-bcb2-495f-9a54-efc48bb452c8"/>
                <textElement>
                    <font size="12"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{Indirizzo}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="380" y="110" width="170" height="30" uuid="9174f886-5c23-4f99-9c97-86fb50f6eeb3"/>
                <textElement>
                    <font size="12"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{Citta}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="50" y="180" width="500" height="30" uuid="089a3b80-f7df-461b-be75-bcad575bf4e9"/>
                <textElement>
                    <font size="12"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{Oggetto}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="50" y="220" width="500" height="210" uuid="a5a724e9-c81f-470a-8a83-9dd6bfbd823d"/>
                <textElement>
                    <font size="12"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{Testata}]]></textFieldExpression>
            </textField>
        </band>
    </columnHeader>
    <detail>
        <band height="258" splitType="Stretch">
            <componentElement>
                <reportElement isPrintRepeatedValues="false" x="0" y="0" width="555" height="258" isPrintWhenDetailOverflows="true" uuid="0b81fbff-083a-493c-b257-9be186dec092">
                    <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/>
                    <property name="com.jaspersoft.studio.table.style.table_header" value="Table_TH"/>
                    <property name="com.jaspersoft.studio.table.style.column_header" value="Table_CH"/>
                    <property name="com.jaspersoft.studio.table.style.detail" value="Table_TD"/>
                    <property name="com.jaspersoft.studio.components.autoresize.proportional" value="true"/>
                </reportElement>
                <jr:table 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="DataSetCapitoli" uuid="0cacc6f4-2336-476b-afdc-9e6817a59395">
                        <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.JREmptyDataSource()]]></dataSourceExpression>
                    </datasetRun>
                    <jr:column width="93" uuid="aab1f738-9d1f-40de-85ab-79d71165f9f7">
                        <jr:detailCell style="Table_TD" height="30">
                            <textField>
                                <reportElement x="0" y="0" width="93" height="30" uuid="635e1581-2b11-4f50-9713-ae104f41c2e5"/>
                                <textFieldExpression><![CDATA[$F{NomeCapitolo}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                    <jr:column width="93" uuid="7862a805-c748-4360-9d4f-dcb6f85be128">
                        <jr:detailCell style="Table_TD" height="30">
                            <textField>
                                <reportElement x="0" y="0" width="93" height="30" uuid="95f73389-ef6a-463b-8977-8a9717bc0950"/>
                                <textFieldExpression><![CDATA[$F{Descrizione}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                    <jr:column width="93" uuid="79e7278a-9dab-40f4-a6f1-8fe955b1eed2">
                        <jr:detailCell style="Table_TD" height="30">
                            <textField>
                                <reportElement x="0" y="0" width="93" height="30" uuid="9632c2f4-e0f2-4072-a2cf-dd4c4b32279d"/>
                                <textFieldExpression><![CDATA[$F{Immagine}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                    <jr:column width="92" uuid="0ab27dc3-e90b-47b7-88e2-1196af728688">
                        <jr:detailCell style="Table_TD" height="30">
                            <textField>
                                <reportElement x="0" y="0" width="92" height="30" uuid="65788c02-b8a7-40b5-bf82-429a69a1a09d"/>
                                <textFieldExpression><![CDATA[$F{NomeBreve}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                    <jr:column width="92" uuid="8052e9b9-69fc-4d67-81c9-c6d051565999">
                        <jr:detailCell style="Table_TD" height="30">
                            <textField>
                                <reportElement x="0" y="0" width="92" height="30" uuid="55be7dc9-6b87-41a2-bb22-6291e8954f59"/>
                                <textFieldExpression><![CDATA[$F{Costo}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                    <jr:column width="92" uuid="b4526f96-6bee-44c7-9be2-20a2b552e676">
                        <jr:detailCell style="Table_TD" height="30">
                            <textField>
                                <reportElement x="0" y="0" width="92" height="30" uuid="357020e6-5047-44cd-a070-f33d1a106b9d"/>
                                <textFieldExpression><![CDATA[$F{Quantita}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                </jr:table>
            </componentElement>
        </band>
    </detail>
    <columnFooter>
        <band height="45" splitType="Stretch"/>
    </columnFooter>
    <pageFooter>
        <band height="69" splitType="Stretch">
            <textField>
                <reportElement x="470" y="30" width="100" height="30" uuid="980219d2-fe09-46a6-ad45-44b5a5d955dd"/>
                <textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
            </textField>
        </band>
    </pageFooter>
    <summary>
        <band height="42" splitType="Stretch"/>
    </summary>
</jasperReport>
java spring jasper-reports report dynamic-jasper
© www.soinside.com 2019 - 2024. All rights reserved.