Jump to content
Changes to the Jaspersoft community edition download ×

several subreports in a detail?


josechinese

Recommended Posts

is possible make a report with 2 or more subreports in a same detail and the same band?

 

like that...

 

<detail>

<band height="110">

<textField isStretchWithOverflow="true">

<reportElement x="0" y="0" width="400" height="12" forecolor="gray"/>

<textElement textAlignment="Left">

<font size="11"/>

</textElement>

<textFieldExpression class="java.lang.String">

"Código: " + $F{FA_cod_formula_articulo}

</textFieldExpression>

</textField>

 

<textField isStretchWithOverflow="true">

<reportElement x="0" y="15" width="400" height="12" positionType="Float"/>

<textElement textAlignment="Left">

<font size="9"/>

</textElement>

<textFieldExpression class="java.lang.String">

"Formula: "+ $F{FA_descripcion}

</textFieldExpression>

</textField>

 

 

<textField isStretchWithOverflow="true">

 

<reportElement x="0" y="30" width="400" height="12" positionType="Float"/>

 

<textElement textAlignment="Left">

<font size="9"/>

</textElement>

<textFieldExpression class="java.lang.String">

"Cantidad: "+ $F{FA_cantidad}

</textFieldExpression>

</textField>

 

 

<subreport>

 

<reportElement key="subreport-1" mode="Opaque" x="1" y="45" width="518" isRemoveLineWhenBlank="true" height="20">

<printWhenExpression>

<![CDATA[($F{UN_cod_unidad}!=null)? Boolean.TRUE:Boolean.FALSE]]>

</printWhenExpression>

</reportElement>

 

<subreportParameter name="TituloSubReporte">

<subreportParameterExpression><![CDATA[$P{TituloSubReporte}]]></subreportParameterExpression>

</subreportParameter>

 

<subreportParameter name="FA_cod_formula_articulo">

<subreportParameterExpression><![CDATA[$F{FA_cod_formula_articulo}]]></subreportParameterExpression>

</subreportParameter>

 

<subreportParameter name="SubReporteInsumos">

<subreportParameterExpression><![CDATA[$P{SubReporteInsumos}]]></subreportParameterExpression>

</subreportParameter>

 

<subreportParameter name="SubConsulta">

<subreportParameterExpression><![CDATA["SELECT * from VARFA_variante_formula_articulo WHERE FA_cod_formula_articulo="+ $F{FA_cod_formula_articulo} + "']]></subreportParameterExpression>

</subreportParameter>

 

<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>

 

<subreportExpression class="net.sf.jasperreports.engine.JasperReport"><![CDATA[$P{SubReporte}]]>

</subreportExpression>

 

</subreport>

 

<subreport>

 

<reportElement key="subreport-1" mode="Opaque" x="1" y="45" width="518" isRemoveLineWhenBlank="true" height="20">

<printWhenExpression>

<![CDATA[($F{UN_cod_unidad}!=null)? Boolean.TRUE:Boolean.FALSE]]>

</printWhenExpression>

</reportElement>

 

 

<subreportParameter name="SubConsultaSimple">

<subreportParameterExpression><![CDATA["SELECT * from INSFA_insumos_formula WHERE FA_cod_formula_articulo='"+ $F{FA_cod_formula_articulo} +"'" ]]></subreportParameterExpression>

</subreportParameter>

 

<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>

 

<subreportExpression class="net.sf.jasperreports.engine.JasperReport"><![CDATA[$P{SubReporteInsumosSimple}]]>

</subreportExpression>

 

</subreport>

 

 

 

</band>

</detail>

 

 

where is the error....

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...