Jump to content
Changes to the Jaspersoft community edition download ×

Paginating detail band subreport relative to master height band


sibellychan

Recommended Posts

Well... what I'm trying to do is the following:

  •  I have the master report with 2 Details Band with just one subreport each.
  • My subreport have a JRBeanCollectionDataSource, and I would like that this list paginates, But, keeping the size of my master band detail.

Here goes a picture to a better explain: ( https://drive.google.com/file/d/0B5_N-9fKzdQGOE5zM1JpV2M1YjA/view?usp=sharing )

And here goes a simple project that reproduces the issue: https://github.com/Sibelly/jasper-subrelatorios

 

  • ================================================My Master .jrxml
<?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="VendaDeProdutoPai" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="81761694-ae4e-4cdf-89a3-6f5cf85b9c12">    <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>    <property name="com.jaspersoft.studio.property.dataset.dialog.DatasetDialog.sash.w1" value="422"/>    <property name="com.jaspersoft.studio.property.dataset.dialog.DatasetDialog.sash.w2" value="563"/>    <import value="net.sf.jasperreports.engine.JRDataSource"/>    <import value="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"/>    <parameter name="SUBREPORT_DIR" class="java.lang.String">        <defaultValueExpression><![CDATA["C:\Users\suporte\JaspersoftWorkspace\kratosreports-local\"]]></defaultValueExpression>    </parameter>    <parameter name="EMITENTE" class="solutions.kratos.reports.modelo.entidades.EmpresaRelatorio"/>    <parameter name="EMITENTE_RAZAO_SOCIAL" class="java.lang.String"/>    <parameter name="EMITENTE_CNPJ" class="java.lang.String"/>    <parameter name="CLIENTE" class="solutions.kratos.reports.modelo.entidades.ClienteRelatorio"/>    <parameter name="NUMERO_DOCUMENTO" class="java.lang.Integer"/>    <parameter name="NUMERO_NFE" class="java.lang.String"/>    <parameter name="VENDA" class="solutions.kratos.reports.modelo.entidades.VendaProdutoRelatorio"/>    <parameter name="FATURAS" class="java.util.List"/>    <parameter name="QTDE_TOTAL_ITENS" class="java.math.BigDecimal"/>    <parameter name="SOMA_TOTAL_PRODUTOS" class="java.math.BigDecimal"/>    <parameter name="ITENS" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource" isForPrompting="false"/>    <parameter name="SUB_DATASOURCE" class="java.util.Collection" isForPrompting="false"/>    <queryString language="java">        <![CDATA[]]>    </queryString>    <detail>        <band height="150" splitType="Prevent">            <property name="com.jaspersoft.studio.unit.height" value="pixel"/>            <subreport isUsingCache="false" runToBottom="false" overflowType="Stretch">                <reportElement stretchType="RelativeToBandHeight" x="0" y="0" width="555" height="150" uuid="32ad29cb-f19d-4768-ab66-e7bf806eb2fb">                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>                </reportElement>                <subreportParameter name="SUBREPORT_DIR">                    <subreportParameterExpression><![CDATA[$P{SUBREPORT_DIR}]]></subreportParameterExpression>                </subreportParameter>                <subreportParameter name="EMITENTE">                    <subreportParameterExpression><![CDATA[$P{EMITENTE}]]></subreportParameterExpression>                </subreportParameter>                <subreportParameter name="EMITENTE_RAZAO_SOCIAL">                    <subreportParameterExpression><![CDATA[$P{EMITENTE_RAZAO_SOCIAL}]]></subreportParameterExpression>                </subreportParameter>                <subreportParameter name="EMITENTE_CNPJ">                    <subreportParameterExpression><![CDATA[$P{EMITENTE_CNPJ}]]></subreportParameterExpression>                </subreportParameter>                <subreportParameter name="CLIENTE">                    <subreportParameterExpression><![CDATA[$P{CLIENTE}]]></subreportParameterExpression>                </subreportParameter>                <subreportParameter name="NUMERO_DOCUMENTO">                    <subreportParameterExpression><![CDATA[$P{NUMERO_DOCUMENTO}]]></subreportParameterExpression>                </subreportParameter>                <subreportParameter name="NUMERO_NFE">                    <subreportParameterExpression><![CDATA[$P{NUMERO_NFE}]]></subreportParameterExpression>                </subreportParameter>                <subreportParameter name="VENDA">                    <subreportParameterExpression><![CDATA[$P{VENDA}]]></subreportParameterExpression>                </subreportParameter>                <subreportParameter name="FATURAS">                    <subreportParameterExpression><![CDATA[$P{FATURAS}]]></subreportParameterExpression>                </subreportParameter>                <subreportParameter name="QTDE_TOTAL_ITENS">                    <subreportParameterExpression><![CDATA[$P{QTDE_TOTAL_ITENS}]]></subreportParameterExpression>                </subreportParameter>                <subreportParameter name="SOMA_TOTAL_PRODUTOS">                    <subreportParameterExpression><![CDATA[$P{SOMA_TOTAL_PRODUTOS}]]></subreportParameterExpression>                </subreportParameter>                <subreportParameter name="ITENS">                    <subreportParameterExpression><![CDATA[$P{ITENS}]]></subreportParameterExpression>                </subreportParameter>                <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($P{SUB_DATASOURCE})]]></dataSourceExpression>                <subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "sub.jasper"]]></subreportExpression>            </subreport>        </band>        <band height="170">            <property name="com.jaspersoft.studio.unit.height" value="pixel"/>            <subreport isUsingCache="false" runToBottom="false" overflowType="Stretch">                <reportElement x="0" y="20" width="555" height="150" uuid="7d448144-8009-4b70-bdac-76b240be6a46">                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>                </reportElement>                <subreportParameter name="SUBREPORT_DIR">                    <subreportParameterExpression><![CDATA[$P{SUBREPORT_DIR}]]></subreportParameterExpression>                </subreportParameter>                <subreportParameter name="EMITENTE">                    <subreportParameterExpression><![CDATA[$P{EMITENTE}]]></subreportParameterExpression>                </subreportParameter>                <subreportParameter name="EMITENTE_RAZAO_SOCIAL">                    <subreportParameterExpression><![CDATA[$P{EMITENTE_RAZAO_SOCIAL}]]></subreportParameterExpression>                </subreportParameter>                <subreportParameter name="EMITENTE_CNPJ">                    <subreportParameterExpression><![CDATA[$P{EMITENTE_CNPJ}]]></subreportParameterExpression>                </subreportParameter>                <subreportParameter name="CLIENTE">                    <subreportParameterExpression><![CDATA[$P{CLIENTE}]]></subreportParameterExpression>                </subreportParameter>                <subreportParameter name="NUMERO_DOCUMENTO">                    <subreportParameterExpression><![CDATA[$P{NUMERO_DOCUMENTO}]]></subreportParameterExpression>                </subreportParameter>                <subreportParameter name="NUMERO_NFE">                    <subreportParameterExpression><![CDATA[$P{NUMERO_NFE}]]></subreportParameterExpression>                </subreportParameter>                <subreportParameter name="VENDA">                    <subreportParameterExpression><![CDATA[$P{VENDA}]]></subreportParameterExpression>                </subreportParameter>                <subreportParameter name="FATURAS">                    <subreportParameterExpression><![CDATA[$P{FATURAS}]]></subreportParameterExpression>                </subreportParameter>                <subreportParameter name="QTDE_TOTAL_ITENS">                    <subreportParameterExpression><![CDATA[$P{QTDE_TOTAL_ITENS}]]></subreportParameterExpression>                </subreportParameter>                <subreportParameter name="SOMA_TOTAL_PRODUTOS">                    <subreportParameterExpression><![CDATA[$P{SOMA_TOTAL_PRODUTOS}]]></subreportParameterExpression>                </subreportParameter>                <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($P{SUB_DATASOURCE})]]></dataSourceExpression>                <subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "sub.jasper"]]></subreportExpression>            </subreport>            <line>                <reportElement x="-20" y="4" width="595" height="1" uuid="2e82e897-6e83-4f88-8f5f-3fbe357de388"/>                <graphicElement>                    <pen lineStyle="Dashed"/>                </graphicElement>            </line>        </band>    </detail></jasperReport>[/code]

 

  • ============================================My SubReport .jrxml
<?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="sub" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="595" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" whenResourceMissingType="Empty" uuid="b39c2024-ce26-439f-a474-c5aa3e4fd93f">    <property name="com.jaspersoft.studio.data.defaultdataadapter" value="New Data Adapter "/>    <parameter name="SUBREPORT_DIR" class="java.lang.String">        <defaultValueExpression><![CDATA["C:\Users\suporte\JaspersoftWorkspace\kratosreports-local\"]]></defaultValueExpression>    </parameter>    <parameter name="EMITENTE" class="solutions.kratos.reports.modelo.entidades.EmpresaRelatorio"/>    <parameter name="EMITENTE_RAZAO_SOCIAL" class="java.lang.String"/>    <parameter name="EMITENTE_CNPJ" class="java.lang.String"/>    <parameter name="CLIENTE" class="solutions.kratos.reports.modelo.entidades.ClienteRelatorio"/>    <parameter name="NUMERO_DOCUMENTO" class="java.lang.Integer"/>    <parameter name="NUMERO_NFE" class="java.lang.String"/>    <parameter name="VENDA" class="solutions.kratos.reports.modelo.entidades.VendaProdutoRelatorio"/>    <parameter name="FATURAS" class="java.util.List"/>    <parameter name="QTDE_TOTAL_ITENS" class="java.math.BigDecimal"/>    <parameter name="SOMA_TOTAL_PRODUTOS" class="java.math.BigDecimal"/>    <parameter name="SUB_DATASOURCE" class="java.util.Collection"/>    <queryString>        <![CDATA[]]>    </queryString>    <field name="seguro" class="java.math.BigDecimal">        <fieldDescription><![CDATA[seguro]]></fieldDescription>    </field>    <field name="valorLiquidoComIpi" class="java.math.BigDecimal">        <fieldDescription><![CDATA[valorLiquidoComIpi]]></fieldDescription>    </field>    <field name="desconto" class="java.math.BigDecimal">        <fieldDescription><![CDATA[desconto]]></fieldDescription>    </field>    <field name="cofinsPago" class="java.math.BigDecimal">        <fieldDescription><![CDATA[cofinsPago]]></fieldDescription>    </field>    <field name="aliquotaCofinsValor" class="java.math.BigDecimal">        <fieldDescription><![CDATA[aliquotaCofinsValor]]></fieldDescription>    </field>    <field name="descricaoDoItem" class="java.lang.String">        <fieldDescription><![CDATA[descricaoDoItem]]></fieldDescription>    </field>    <field name="ICMSST" class="java.math.BigDecimal">        <fieldDescription><![CDATA[iCMSST]]></fieldDescription>    </field>    <field name="cstCOFINS" class="java.lang.String">        <fieldDescription><![CDATA[cstCOFINS]]></fieldDescription>    </field>    <field name="baseCalculoICMSST" class="java.math.BigDecimal">        <fieldDescription><![CDATA[baseCalculoICMSST]]></fieldDescription>    </field>    <field name="codigoCfop" class="java.lang.Integer">        <fieldDescription><![CDATA[codigoCfop]]></fieldDescription>    </field>    <field name="subTotal" class="java.math.BigDecimal">        <fieldDescription><![CDATA[subTotal]]></fieldDescription>    </field>    <field name="cstPIS" class="java.lang.String">        <fieldDescription><![CDATA[cstPIS]]></fieldDescription>    </field>    <field name="codigoContribuicaoSocialApurada" class="java.lang.String">        <fieldDescription><![CDATA[codigoContribuicaoSocialApurada]]></fieldDescription>    </field>    <field name="cstICMS" class="java.lang.String">        <fieldDescription><![CDATA[cstICMS]]></fieldDescription>    </field>    <field name="valorUnitario" class="java.math.BigDecimal">        <fieldDescription><![CDATA[valorUnitario]]></fieldDescription>    </field>    <field name="valorICMS" class="java.math.BigDecimal">        <fieldDescription><![CDATA[valorICMS]]></fieldDescription>    </field>    <field name="valorPIS" class="java.math.BigDecimal">        <fieldDescription><![CDATA[valorPIS]]></fieldDescription>    </field>    <field name="frete" class="java.math.BigDecimal">        <fieldDescription><![CDATA[frete]]></fieldDescription>    </field>    <field name="ncm" class="java.lang.String">        <fieldDescription><![CDATA[ncm]]></fieldDescription>    </field>    <field name="codigoRecolhimentoPisCofins" class="java.lang.String">        <fieldDescription><![CDATA[codigoRecolhimentoPisCofins]]></fieldDescription>    </field>    <field name="id" class="java.lang.Long">        <fieldDescription><![CDATA[id]]></fieldDescription>    </field>    <field name="aliquotaICMS" class="java.lang.Double">        <fieldDescription><![CDATA[aliquotaICMS]]></fieldDescription>    </field>    <field name="class" class="java.lang.Class">        <fieldDescription><![CDATA[class]]></fieldDescription>    </field>    <field name="indicadorDoTipoDeCredito" class="java.lang.String">        <fieldDescription><![CDATA[indicadorDoTipoDeCredito]]></fieldDescription>    </field>    <field name="quantidade" class="java.math.BigDecimal">        <fieldDescription><![CDATA[quantidade]]></fieldDescription>    </field>    <field name="valorIpi" class="java.math.BigDecimal">        <fieldDescription><![CDATA[valorIpi]]></fieldDescription>    </field>    <field name="unidadeDeMedida" class="java.lang.String">        <fieldDescription><![CDATA[unidadeDeMedida]]></fieldDescription>    </field>    <field name="aliquotaPisValor" class="java.math.BigDecimal">        <fieldDescription><![CDATA[aliquotaPisValor]]></fieldDescription>    </field>    <field name="valorLiquido" class="java.math.BigDecimal">        <fieldDescription><![CDATA[valorLiquido]]></fieldDescription>    </field>    <field name="receita" class="java.math.BigDecimal">        <fieldDescription><![CDATA[receita]]></fieldDescription>    </field>    <field name="baseCalculoQuantidade" class="java.math.BigDecimal">        <fieldDescription><![CDATA[baseCalculoQuantidade]]></fieldDescription>    </field>    <field name="isentasICMS" class="java.math.BigDecimal">        <fieldDescription><![CDATA[isentasICMS]]></fieldDescription>    </field>    <field name="naturezaReceita" class="java.lang.String">        <fieldDescription><![CDATA[naturezaReceita]]></fieldDescription>    </field>    <field name="cfop" class="java.lang.String">        <fieldDescription><![CDATA[cfop]]></fieldDescription>    </field>    <field name="descricaoCfop" class="java.lang.String">        <fieldDescription><![CDATA[descricaoCfop]]></fieldDescription>    </field>    <field name="aliquotaPIS" class="java.math.BigDecimal">        <fieldDescription><![CDATA[aliquotaPIS]]></fieldDescription>    </field>    <field name="baseCalculoICMS" class="java.math.BigDecimal">        <fieldDescription><![CDATA[baseCalculoICMS]]></fieldDescription>    </field>    <field name="valorCOFINS" class="java.math.BigDecimal">        <fieldDescription><![CDATA[valorCOFINS]]></fieldDescription>    </field>    <field name="despesasAcessorias" class="java.math.BigDecimal">        <fieldDescription><![CDATA[despesasAcessorias]]></fieldDescription>    </field>    <field name="naturezaFreteContratado" class="java.lang.String">        <fieldDescription><![CDATA[naturezaFreteContratado]]></fieldDescription>    </field>    <field name="pisPago" class="java.math.BigDecimal">        <fieldDescription><![CDATA[pisPago]]></fieldDescription>    </field>    <field name="venda" class="solutions.kratos.reports.modelo.entidades.VendaProdutoRelatorio">        <fieldDescription><![CDATA[venda]]></fieldDescription>    </field>    <field name="produto" class="solutions.kratos.reports.modelo.entidades.ProdutoRelatorio">        <fieldDescription><![CDATA[produto]]></fieldDescription>    </field>    <field name="baseCalculoValor" class="java.math.BigDecimal">        <fieldDescription><![CDATA[baseCalculoValor]]></fieldDescription>    </field>    <field name="numeroDoItem" class="java.lang.Integer">        <fieldDescription><![CDATA[numeroDoItem]]></fieldDescription>    </field>    <field name="outrasICMS" class="java.math.BigDecimal">        <fieldDescription><![CDATA[outrasICMS]]></fieldDescription>    </field>    <field name="codigoBaseCalculoDoCredito" class="java.lang.String">        <fieldDescription><![CDATA[codigoBaseCalculoDoCredito]]></fieldDescription>    </field>    <field name="aliquotaCOFINS" class="java.math.BigDecimal">        <fieldDescription><![CDATA[aliquotaCOFINS]]></fieldDescription>    </field>    <variable name="DESCONTO" class="java.math.BigDecimal" resetType="None" incrementType="Column" calculation="Sum">        <variableExpression><![CDATA[$F{desconto} != null ? $F{desconto} : BigDecimal.ZERO]]></variableExpression>        <initialValueExpression><![CDATA[bigDecimal.ZERO]]></initialValueExpression>    </variable>    <variable name="FRETE" class="java.math.BigDecimal" resetType="None" incrementType="Column" calculation="Sum">        <variableExpression><![CDATA[$F{frete} != null ? $F{frete} : BigDecimal.ZERO]]></variableExpression>        <initialValueExpression><![CDATA[bigDecimal.ZERO]]></initialValueExpression>    </variable>    <variable name="TOTAL_PRODUTO" class="java.math.BigDecimal">        <variableExpression><![CDATA[$F{valorUnitario}.multiply($F{quantidade}).subtract($F{desconto} != null ? $F{desconto} : BigDecimal.ZERO)]]></variableExpression>        <initialValueExpression><![CDATA[bigDecimal.ZERO]]></initialValueExpression>    </variable>    <title>        <band height="105" splitType="Stretch">            <rectangle>                <reportElement x="5" y="0" width="555" height="54" uuid="e0d14a74-9b29-4cd8-ac8c-e6d75bf48ba2"/>                <graphicElement>                    <pen lineWidth="0.5"/>                </graphicElement>            </rectangle>            <textField>                <reportElement x="10" y="36" width="67" height="18" uuid="91b01a33-9fc4-4b2c-ba2e-45a1c457bb82"/>                <textElement verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="13" isBold="true"/>                </textElement>                <textFieldExpression><![CDATA["Pedido N. "]]></textFieldExpression>            </textField>            <textField>                <reportElement x="10" y="0" width="460" height="22" uuid="5dddc194-604d-4aff-b074-8aac3957935a"/>                <textElement verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="14" isBold="false"/>                </textElement>                <textFieldExpression><![CDATA[$P{EMITENTE}.getRazaoSocial().trim()]]></textFieldExpression>            </textField>            <staticText>                <reportElement x="5" y="56" width="54" height="12" uuid="427b18ad-5ba1-4d19-98e3-905b192d5ff9"/>                <textElement verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="9" isBold="true"/>                </textElement>                <text><![CDATA[Cliente:]]></text>            </staticText>            <textField>                <reportElement x="59" y="56" width="303" height="12" uuid="8b4788df-a97a-4970-bef9-72d1d055394e"/>                <textElement verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="9"/>                </textElement>                <textFieldExpression><![CDATA[$P{CLIENTE}.getRazaoSocial().trim()]]></textFieldExpression>            </textField>            <staticText>                <reportElement x="368" y="56" width="60" height="12" uuid="d9f19d14-3add-49f0-be80-11caa675838b"/>                <textElement verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="9" isBold="true"/>                </textElement>                <text><![CDATA[CPF/CNPJ:]]></text>            </staticText>            <textField>                <reportElement x="428" y="56" width="124" height="12" uuid="b237c0c7-ba7c-42f4-b97f-d7aab32e4765"/>                <textElement verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="9"/>                </textElement>                <textFieldExpression><![CDATA[($P{CLIENTE}.getCpf() != null && $P{CLIENTE}.getCpf() != "") ? $P{CLIENTE}.getCpf() : $P{CLIENTE}.getCnpj()]]></textFieldExpression>            </textField>            <staticText>                <reportElement x="5" y="68" width="54" height="12" uuid="95482343-adaf-4d4f-a73b-66cb655fbf83"/>                <textElement verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="9" isBold="true"/>                </textElement>                <text><![CDATA[Endereço:]]></text>            </staticText>            <textField>                <reportElement x="59" y="68" width="303" height="12" uuid="2b44e32d-91fe-41f1-a142-7cb9a819cfc2"/>                <textElement verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="9"/>                </textElement>                <textFieldExpression><![CDATA[$P{VENDA}.getEnderecoDoClienteParaEstaVenda().getTipoLogradouro() + " " + $P{VENDA}.getEnderecoDoClienteParaEstaVenda().getLogradouro() + ", " + $P{VENDA}.getEnderecoDoClienteParaEstaVenda().getNumero()]]></textFieldExpression>            </textField>            <staticText>                <reportElement x="5" y="80" width="54" height="12" uuid="c9436ebd-2bce-409a-a4ad-b5d9a4967bd7"/>                <textElement verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="9" isBold="true"/>                </textElement>                <text><![CDATA[bairro:]]></text>            </staticText>            <textField>                <reportElement x="59" y="80" width="303" height="12" uuid="1b8a2e22-8698-4360-8028-4ba05e16bc40"/>                <textElement verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="9"/>                </textElement>                <textFieldExpression><![CDATA[$P{VENDA}.getEnderecoDoClienteParaEstaVenda().getTipoBairro() + " " + $P{VENDA}.getEnderecoDoClienteParaEstaVenda().getBairro()]]></textFieldExpression>            </textField>            <staticText>                <reportElement x="368" y="80" width="60" height="12" uuid="44e49b13-5e83-4807-8da9-55cdf2affb45"/>                <textElement verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="9" isBold="true"/>                </textElement>                <text><![CDATA[Município:]]></text>            </staticText>            <textField>                <reportElement x="428" y="80" width="124" height="12" uuid="7c28c1dd-4aa5-45cd-a260-925a76655e30"/>                <textElement verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="9"/>                </textElement>                <textFieldExpression><![CDATA[$P{VENDA}.getEnderecoDoClienteParaEstaVenda().getCidade().getNome() + " - " + $P{VENDA}.getEnderecoDoClienteParaEstaVenda().getEstado().getSigla()]]></textFieldExpression>            </textField>            <textField isBlankWhenNull="true">                <reportElement x="428" y="68" width="124" height="12" uuid="9d921ed0-8a5c-47ec-acf2-e8a536bae402"/>                <textElement verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="9"/>                </textElement>                <textFieldExpression><![CDATA[$P{CLIENTE}.getTelefoneFixo()]]></textFieldExpression>            </textField>            <staticText>                <reportElement x="368" y="68" width="60" height="12" uuid="85832138-5a9c-4c32-b6e2-9a6fc4490acd"/>                <textElement verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="9" isBold="true"/>                </textElement>                <text><![CDATA[Telefone:]]></text>            </staticText>            <textField pattern="dd/MM/yyyy HH:mm" isBlankWhenNull="true">                <reportElement x="319" y="42" width="75" height="12" uuid="c3b5d01c-813d-494b-857c-a1952090ac56"/>                <textElement verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="9" isBold="true"/>                </textElement>                <textFieldExpression><![CDATA[$P{VENDA}.getDataPedido()]]></textFieldExpression>            </textField>            <line>                <reportElement x="5" y="93" width="555" height="1" uuid="328d4de0-ebd7-4e6b-8e74-2f33c7e533f4"/>            </line>            <textField>                <reportElement x="10" y="22" width="334" height="12" uuid="92f4e600-96a8-4cec-a5fe-fc112e6ba5a0"/>                <textElement verticalAlignment="Top">                    <font fontName="DejaVu Sans" size="9" isBold="true"/>                </textElement>                <textFieldExpression><![CDATA[$P{EMITENTE}.getCnpj() != null ? "CNPJ: " + $P{EMITENTE}.getCnpj() : "CPF: " + $P{EMITENTE}.getCpf()]]></textFieldExpression>            </textField>            <textField isBlankWhenNull="true">                <reportElement x="77" y="36" width="78" height="18" uuid="1b138d86-f6c1-465f-bf97-0f90db4de35f"/>                <textElement verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="13" isBold="true"/>                </textElement>                <textFieldExpression><![CDATA[$P{NUMERO_DOCUMENTO}]]></textFieldExpression>            </textField>            <subreport>                <reportElement x="5" y="97" width="372" height="8" uuid="400d23cb-f7bd-4ec5-b92b-5f53bbd70593"/>                <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($P{FATURAS})]]></dataSourceExpression>                <subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "VendaDeProduto_subreport1_parcelas.jasper"]]></subreportExpression>            </subreport>            <textField pattern="dd/MM/yyyy HH:mm" isBlankWhenNull="true">                <reportElement x="470" y="42" width="75" height="12" uuid="d50e03eb-cf83-4fa6-a59a-d230b041757b"/>                <textElement verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="9" isBold="true"/>                </textElement>                <textFieldExpression><![CDATA[$P{VENDA}.getDataSaida()]]></textFieldExpression>            </textField>            <staticText>                <reportElement x="244" y="42" width="75" height="12" uuid="cc48448c-3049-45af-899b-39ed6caca939">                    <property name="com.jaspersoft.studio.unit.y" value="pixel"/>                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>                </reportElement>                <textElement textAlignment="Right" verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="9" isBold="false"/>                </textElement>                <text><![CDATA[Data do pedido:]]></text>            </staticText>            <staticText>                <reportElement x="395" y="42" width="75" height="12" uuid="a64508af-2820-4399-ac2a-f50707b70976">                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>                </reportElement>                <textElement textAlignment="Right" verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="9" isBold="false"/>                </textElement>                <text><![CDATA[saída/Entrega:]]></text>            </staticText>            <textField pattern="dd/MM/yyyy HH:mm:ss" isBlankWhenNull="true">                <reportElement x="470" y="0" width="90" height="22" uuid="bbce5644-b8c5-472a-b66a-2513535cde4b"/>                <textElement verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="9" isBold="false"/>                </textElement>                <textFieldExpression><![CDATA[$P{EMITENTE}.getTelefone()]]></textFieldExpression>            </textField>        </band>    </title>    <columnHeader>        <band height="36">            <rectangle>                <reportElement x="5" y="17" width="555" height="15" forecolor="#EDEDED" backcolor="#EDEDED" uuid="e260abf8-6811-4bed-bb37-5914f3d76664"/>            </rectangle>            <staticText>                <reportElement x="47" y="19" width="212" height="11" uuid="439d10e7-774d-4bb7-b2ba-a9f774fbe80b"/>                <textElement textAlignment="Center" verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="8" isBold="true"/>                </textElement>                <text><![CDATA[Descrição]]></text>            </staticText>            <staticText>                <reportElement x="262" y="19" width="56" height="11" uuid="6d08f2df-db1a-44f2-aea7-811b9dac99d6"/>                <textElement textAlignment="Right" verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="8" isBold="true"/>                </textElement>                <text><![CDATA[Qtd]]></text>            </staticText>            <staticText>                <reportElement x="380" y="19" width="56" height="11" uuid="d6cbafea-424c-42ef-97d0-71b990d939ad"/>                <textElement textAlignment="Right" verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="8" isBold="true"/>                </textElement>                <text><![CDATA[Valor Unit.]]></text>            </staticText>            <staticText>                <reportElement x="439" y="19" width="56" height="11" uuid="69bd6f00-36fd-464f-8a2f-5e57c825ed10"/>                <textElement textAlignment="Right" verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="8" isBold="true"/>                </textElement>                <text><![CDATA[Desconto]]></text>            </staticText>            <line>                <reportElement x="5" y="35" width="555" height="1" uuid="eb0c11bc-4a36-4e6b-ab19-f26385848793"/>                <graphicElement>                    <pen lineWidth="0.5" lineColor="#CCCCCC"/>                </graphicElement>            </line>            <staticText>                <reportElement x="5" y="19" width="33" height="11" uuid="0afe0946-8361-46e2-a91f-475b57f70592"/>                <textElement verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="8" isBold="true"/>                </textElement>                <text><![CDATA[Cód.]]></text>            </staticText>            <staticText>                <reportElement x="499" y="19" width="56" height="11" uuid="5bedae82-d39c-45af-8b25-fd7f0731e2da"/>                <textElement textAlignment="Right" verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="8" isBold="true"/>                </textElement>                <text><![CDATA[Total]]></text>            </staticText>            <staticText>                <reportElement x="321" y="19" width="56" height="11" uuid="48637ca8-f69c-4e82-9393-1482db776c67"/>                <textElement textAlignment="Right" verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="8" isBold="true"/>                </textElement>                <text><![CDATA[un. Med.]]></text>            </staticText>            <line>                <reportElement x="5" y="32" width="555" height="1" uuid="6af236e8-a39e-47f6-941d-4e871f61c9fa"/>            </line>            <line>                <reportElement x="5" y="17" width="555" height="1" uuid="958fa0ed-e5b2-4f05-ae55-4693447af6e7"/>            </line>        </band>    </columnHeader>    <detail>        <band height="17" splitType="Prevent">            <textField>                <reportElement x="47" y="1" width="212" height="15" uuid="4c06fef1-9ffc-41ab-b6e5-d8e7281080fc"/>                <textElement verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="8"/>                </textElement>                <textFieldExpression><![CDATA[$F{produto}.getNome().trim()]]></textFieldExpression>            </textField>            <textField pattern="#,##0.000">                <reportElement x="262" y="1" width="56" height="15" uuid="e15c825f-e00c-4b72-9904-26382c326b6e"/>                <textElement textAlignment="Right" verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="8"/>                </textElement>                <textFieldExpression><![CDATA[$F{quantidade}]]></textFieldExpression>            </textField>            <textField pattern="#,##0.00">                <reportElement x="379" y="1" width="56" height="15" uuid="070df5cc-2d5b-4f98-8e00-9ddd65c4f7d9"/>                <textElement textAlignment="Right" verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="8"/>                </textElement>                <textFieldExpression><![CDATA[$F{valorUnitario}]]></textFieldExpression>            </textField>            <textField pattern="#,##0.00">                <reportElement x="439" y="1" width="56" height="15" uuid="82e6a3d6-0436-4b59-a441-46539644e2e6"/>                <textElement textAlignment="Right" verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="8"/>                </textElement>                <textFieldExpression><![CDATA[$F{desconto} != null ? $F{desconto} : BigDecimal.ZERO]]></textFieldExpression>            </textField>            <textField pattern="#,##0.00">                <reportElement x="499" y="1" width="56" height="15" uuid="1886b972-f61e-4531-9a51-dfd6643728ad"/>                <textElement textAlignment="Right" verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="8"/>                </textElement>                <textFieldExpression><![CDATA[$V{TOTAL_PRODUTO}]]></textFieldExpression>            </textField>            <line>                <reportElement x="5" y="16" width="555" height="1" uuid="6adeeee7-d111-4011-93b9-304eff5cd4aa"/>                <graphicElement>                    <pen lineWidth="0.25" lineColor="#999999"/>                </graphicElement>            </line>            <textField>                <reportElement x="5" y="1" width="33" height="15" uuid="dc16fdf4-544e-43b0-a7e7-dbf9354b1846"/>                <textElement textAlignment="Right" verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="8"/>                </textElement>                <textFieldExpression><![CDATA[$F{produto}.getCodigo()]]></textFieldExpression>            </textField>            <textField pattern="#,##0.000">                <reportElement x="321" y="1" width="56" height="15" uuid="95e03089-22a9-4ffe-a777-d53f0e865f14"/>                <textElement textAlignment="Right" verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="8"/>                </textElement>                <textFieldExpression><![CDATA[$F{unidadeDeMedida}]]></textFieldExpression>            </textField>        </band>    </detail>    <summary>        <band height="98">            <line>                <reportElement x="5" y="0" width="555" height="1" uuid="6f85b4d7-15ad-4ba9-830f-51c17888df74"/>                <graphicElement>                    <pen lineWidth="0.5"/>                </graphicElement>            </line>            <staticText>                <reportElement x="412" y="16" width="70" height="12" uuid="8c78c3a2-7b9b-4735-ae3f-2b83235c705b"/>                <textElement textAlignment="Right" verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="9" isBold="true"/>                </textElement>                <text><![CDATA[Desconto:]]></text>            </staticText>            <staticText>                <reportElement x="412" y="28" width="70" height="12" uuid="2a30e51a-3e46-4598-babb-3882866e6a6b"/>                <textElement textAlignment="Right" verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="9" isBold="true"/>                </textElement>                <text><![CDATA[Frete:]]></text>            </staticText>            <staticText>                <reportElement x="417" y="71" width="70" height="13" uuid="fe03cdeb-e1e2-4717-92b5-4e2104d0b537"/>                <textElement textAlignment="Right" verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="9" isBold="true"/>                </textElement>                <text><![CDATA[TOTAL:]]></text>            </staticText>            <textField pattern="#,##0.00">                <reportElement x="485" y="16" width="70" height="12" uuid="72772c27-b20c-4f47-88a6-fea053309700"/>                <textElement textAlignment="Right" verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="9"/>                </textElement>                <textFieldExpression><![CDATA[$P{VENDA}.getValorDesconto()]]></textFieldExpression>            </textField>            <textField pattern="#,##0.00">                <reportElement x="485" y="28" width="70" height="12" uuid="71abc8f4-e215-4634-8082-8bcb606a53db"/>                <textElement textAlignment="Right" verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="9"/>                </textElement>                <textFieldExpression><![CDATA[$P{VENDA}.getValorFrete()]]></textFieldExpression>            </textField>            <textField pattern="#,##0.00">                <reportElement x="490" y="71" width="70" height="13" uuid="139306f9-08c6-4469-bd09-2831a89ae54a"/>                <textElement textAlignment="Right" verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="9" isBold="true"/>                </textElement>                <textFieldExpression><![CDATA[$P{VENDA}.getTotalNFe()]]></textFieldExpression>            </textField>            <line>                <reportElement x="5" y="83" width="555" height="1" uuid="d9272446-6462-4c83-9a96-14ac7c8545a3"/>                <graphicElement>                    <pen lineWidth="0.5"/>                </graphicElement>            </line>            <staticText>                <reportElement x="412" y="40" width="70" height="12" uuid="0fefb1e8-1283-46db-8a54-b69cf80353c3"/>                <textElement textAlignment="Right" verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="9" isBold="true"/>                </textElement>                <text><![CDATA[iPI:]]></text>            </staticText>            <textField pattern="#,##0.00">                <reportElement x="485" y="40" width="70" height="12" uuid="874167ef-fd9e-437b-b57e-d074ec4ff666"/>                <textElement textAlignment="Right" verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="9"/>                </textElement>                <textFieldExpression><![CDATA[$P{VENDA}.getValorIPI()]]></textFieldExpression>            </textField>            <textField isStretchWithOverflow="true">                <reportElement x="5" y="84" width="224" height="14" uuid="4accfbc8-9c78-4db9-9f8b-d1a6a25f96ed"/>                <textElement verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="7" isBold="true"/>                </textElement>                <textFieldExpression><![CDATA["Kratos - Sistema de Gestão Empresarial"]]></textFieldExpression>            </textField>            <staticText>                <reportElement x="5" y="1" width="57" height="12" uuid="2aaf6462-51b1-4375-bbba-e242cc746ba6"/>                <textElement verticalAlignment="Middle">                    <font size="8" isBold="true"/>                </textElement>                <text><![CDATA[Observações:]]></text>            </staticText>            <textField isStretchWithOverflow="true">                <reportElement x="5" y="13" width="375" height="33" uuid="d0e1e99c-d8a5-4cfb-803a-d302636fba14"/>                <textElement verticalAlignment="Top">                    <font fontName="DejaVu Sans" size="7"/>                </textElement>                <textFieldExpression><![CDATA[""+$P{VENDA}.getObservacoesDoPedido()]]></textFieldExpression>            </textField>            <textField>                <reportElement x="70" y="67" width="306" height="16" uuid="f68ff8c3-0f8e-40c8-806f-ff450a1b96d3"/>                <textElement verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="10" isBold="true"/>                </textElement>                <textFieldExpression><![CDATA[$P{VENDA}.getVendedor() != null ? $P{VENDA}.getVendedor() : ""]]></textFieldExpression>            </textField>            <staticText>                <reportElement x="5" y="67" width="65" height="16" uuid="3f1155ee-8473-498b-833e-dc5bf28c593f">                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>                </reportElement>                <textElement verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="10" isBold="true"/>                </textElement>                <text><![CDATA[Vendedor:]]></text>            </staticText>            <textField pattern="#,##0.000" isBlankWhenNull="true">                <reportElement x="262" y="1" width="56" height="12" uuid="7b0146ee-d474-4b22-9507-2108461932b6"/>                <textElement textAlignment="Right" verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="8"/>                </textElement>                <textFieldExpression><![CDATA[$P{QTDE_TOTAL_ITENS}]]></textFieldExpression>            </textField>            <staticText>                <reportElement x="216" y="1" width="46" height="12" uuid="b21134c2-7f18-45ca-b1ec-7df575756bce"/>                <textElement textAlignment="Right" verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="8"/>                </textElement>                <text><![CDATA[Total:]]></text>            </staticText>            <staticText>                <reportElement x="453" y="1" width="42" height="11" uuid="48f72b51-0eb5-4592-aaf6-2579fdc362af"/>                <textElement textAlignment="Right" verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="8"/>                </textElement>                <text><![CDATA[Total:]]></text>            </staticText>            <textField evaluationTime="Column" pattern="#,##0.00" isBlankWhenNull="true">                <reportElement x="499" y="0" width="56" height="12" uuid="49590d59-2544-4edb-8d59-1135e8d92b72"/>                <textElement textAlignment="Right" verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="8"/>                </textElement>                <textFieldExpression><![CDATA[$P{SOMA_TOTAL_PRODUTOS}]]></textFieldExpression>            </textField>            <staticText>                <reportElement x="412" y="52" width="70" height="12" uuid="c5ece385-714e-4a4a-a2ad-694e609ea900"/>                <textElement textAlignment="Right" verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="9" isBold="true"/>                </textElement>                <text><![CDATA[iCMS ST:]]></text>            </staticText>            <textField pattern="#,##0.00" isBlankWhenNull="true">                <reportElement x="485" y="52" width="70" height="12" uuid="2f0bb26d-e1bc-4a83-a5e4-a3efa0d29861"/>                <textElement textAlignment="Right" verticalAlignment="Middle">                    <font fontName="DejaVu Sans" size="9"/>                </textElement>                <textFieldExpression><![CDATA[$P{VENDA}.getValorICMSST()]]></textFieldExpression>            </textField>        </band>    </summary></jasperReport>[/code]

I appreciate any help! Thanks o/

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...