Jump to content
Changes to the Jaspersoft community edition download ×

Display subreport on entire page


2004 IR Help

Recommended Posts

By: Andreas Icecold - cubcuz

Display subreport on entire page

2005-05-24 06:09

Hi,

 

i have a report with some static field and a nested subreport.

 

after page break only as many records as shown on the first page are shown on the following.

I?ve looked already in the nopagebreak sample and tried using a fake group ( with V{REPORT_COUNT} as groupExpression ) as discribed in ohter thread and the documentation, but anything work for me.

 

I use JasperReports 0.64

 

subreport in Masterrecord:

 

<subreport><reportElement positionType="Float" mode="Opaque" isRemoveLineWhenBlank="true" x="0" y="162" width="690" height="20"/><dataSourceExpression>

$P{ReportData}.getInfoTableDataSource(new String("VERWALTUNG_BANKLEITZAHLEN_SUCHEN_1"))

</dataSourceExpression><subreportExpression class="net.sf.jasperreports.engine.JasperReport">

$P{ReportManager}.getCompiledReport(new String($P{ReportCurrDir}+ "VERWALTUNG_BANKLEITZAHLEN_SUCHEN_1.jrxml"))

</subreportExpression></subreport>

 

Subreport:

<jasperReport name="VERWALTUNG_BANKLEITZAHLEN_SUCHEN_1" columnCount="1" printOrder="Vertical" orientation="Landscape" pageWidth="842" pageHeight="595" columnWidth="842" columnSpacing="0" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" whenNoDataType="NoPages" isTitleNewPage="false" isSummaryNewPage="false">

<property name="ireport.scriptlethandling" value="2" />

<import value="java.util.*" />

<import value="net.sf.jasperreports.engine.*" />

<import value="net.sf.jasperreports.engine.data.*" />

<field name="BANKLEITZ51" class="java.lang.Object" />

<field name="ORT51" class="java.lang.Object" />

<field name="PLZ51" class="java.lang.Object" />

<field name="NAMEINST51" class="java.lang.Object" />

<variable name="BANKLEITZ51" class="java.lang.String" resetType="Report">

<variableExpression>$V{BANKLEITZ51}.toString()</variableExpression>

<initialValueExpression>$F{BANKLEITZ51}.toString()</initialValueExpression>

</variable>

<variable name="ORT51" class="java.lang.String" resetType="Report">

<variableExpression>$V{ORT51}.toString()</variableExpression>

<initialValueExpression>$F{ORT51}.toString()</initialValueExpression>

</variable>

<variable name="PLZ51" class="java.lang.String" resetType="Report">

<variableExpression>$V{PLZ51}.toString()</variableExpression>

<initialValueExpression>$F{PLZ51}.toString()</initialValueExpression>

</variable>

<variable name="NAMEINST51" class="java.lang.String" resetType="Report">

<variableExpression>$V{NAMEINST51}.toString()</variableExpression>

<initialValueExpression>$F{NAMEINST51}.toString()</initialValueExpression>

</variable>

<group name="group" minHeightToStartNewPage="0">

<groupExpression>$V{REPORT_COUNT}</groupExpression>

<!--

<groupHeader>

<band height="15">

<textField>

<reportElement x="0" y="0" width="100" height="15"/>

<textFieldExpression class="java.lang.Integer">$V{REPORT_COUNT}</textFieldExpression>

</textField>

</band>

</groupHeader>-->

</group>

<columnHeader>

<band height="20" isSplitAllowed="true">

<line>

<reportElement x="0" y="14" height="0" width="712" forecolor="black" />

<graphicElement pen="1Point" />

</line>

<textField isStretchWithOverflow="false" isBlankWhenNull="false">

<reportElement x="0" y="0" width="1116" height="18" />

<textFieldExpression class="java.lang.String">$V{NAMEINST51}.toString()</textFieldExpression>

</textField>

<textField isStretchWithOverflow="false" isBlankWhenNull="false">

<reportElement x="372" y="0" width="180" height="18" />

<textFieldExpression class="java.lang.String">$V{PLZ51}.toString()</textFieldExpression>

</textField>

<textField isStretchWithOverflow="false" isBlankWhenNull="false">

<reportElement x="432" y="0" width="540" height="18" />

<textFieldExpression class="java.lang.String">$V{ORT51}.toString()</textFieldExpression>

</textField>

<textField isStretchWithOverflow="false" isBlankWhenNull="false">

<reportElement x="612" y="0" width="180" height="18" />

<textFieldExpression class="java.lang.String">$V{BANKLEITZ51}.toString()</textFieldExpression>

</textField>

</band>

</columnHeader>

<detail>

<band height="20" isSplitAllowed="false">

<rectangle>

<reportElement x="0" y="0" width="712" height="15" backcolor="#DDDDDD">

<printWhenExpression>new Boolean(($V{REPORT_COUNT}.intValue()%2)==0)</printWhenExpression>

</reportElement>

<graphicElement pen="None" />

</rectangle>

<textField isStretchWithOverflow="false" isBlankWhenNull="false">

<reportElement isRemoveLineWhenBlank="true" x="0" y="0" width="372" height="18">

<printWhenExpression>new Boolean($V{REPORT_COUNT}.intValue()>1)</printWhenExpression>

</reportElement>

<textFieldExpression class="java.lang.String">$F{NAMEINST51}.toString()</textFieldExpression>

</textField>

<textField isStretchWithOverflow="false" isBlankWhenNull="false">

<reportElement isRemoveLineWhenBlank="true" x="372" y="0" width="60" height="18">

<printWhenExpression>new Boolean($V{REPORT_COUNT}.intValue()>1)</printWhenExpression>

</reportElement>

<textFieldExpression class="java.lang.String">$F{PLZ51}.toString()</textFieldExpression>

</textField>

<textField isStretchWithOverflow="false" isBlankWhenNull="false">

<reportElement isRemoveLineWhenBlank="true" x="432" y="0" width="180" height="18">

<printWhenExpression>new Boolean($V{REPORT_COUNT}.intValue()>1)</printWhenExpression>

</reportElement>

<textFieldExpression class="java.lang.String">$F{ORT51}.toString()</textFieldExpression>

</textField>

<textField isStretchWithOverflow="false" isBlankWhenNull="false">

<reportElement isRemoveLineWhenBlank="true" x="612" y="0" width="60" height="18">

<printWhenExpression>new Boolean($V{REPORT_COUNT}.intValue()>1)</printWhenExpression>

</reportElement>

<textFieldExpression class="java.lang.String">$F{BANKLEITZ51}.toString()</textFieldExpression>

</textField>

</band>

</detail>

</jasperReport>

 

Perhaps anyone can help.

 

Thanks in advance.

 

 

 

 

By: Andreas Icecold - cubcuz

RE: Display subreport on entire page

2005-05-25 07:54

Doesn?t anybody know

 

 

 

 

By: Chris - joshua_dawg

RE: Display subreport on entire page

2005-06-03 13:54

I am having the same problem. I haven't been able to figure it out for quite some time now. Any help would be appreciated!

 

 

 

 

By: Mike Warne - mwarne

RE: Display subreport on entire page

2005-06-09 12:26

Try putting the subreport in it's own group.

in the Band properties set splitAllowed to false. This means if the subreport is large, it must not print some, and then split, but must start on a new page instead.

 

Also you may be able to set the Group properties to force the Group to break on a new page. By playing with these properties you can sometimes get what you want.

 

Mike.

 

 

 

 

By: Andreas Icecold - cubcuz

RE: Display subreport on entire page

2005-06-14 03:52

i will try to figure it out and post a solution if i am successfull.

 

thx.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

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