Jump to content
JasperReports Library 7.0 is now available ×

Records in subreport became separated


Recommended Posts

By: wuliming - akyca

Records in subreport became separated

2003-07-03 21:56

The following is the quotation of subreport in mainreport:

<subreport isUsingCache="true">

<reportElement x="0" y="580" width="515" height="10" backcolor="#FFCC99" positionType="Float"/>

<subreportParameter name="major_id">

<subreportParameterExpression>

$P{major_id}

</subreportParameterExpression>

</subreportParameter>

<connectionExpression>

$P{REPORT_CONNECTION}

</connectionExpression>

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

"ReportManage/report/CulturePlanningSub.jasper"

</subreportExpression>

</subreport>

 

 

and then is my subreport xml fragment :

 

<detail>

<band height="35">

<textField isStretchWithOverflow="true" isBlankWhenNull="true">

<reportElement x="0" y="0" width="95" height="34" isPrintWhenDetailOverflows="true"/>

<textElement textAlignment="Left" verticalAlignment="Middle">

<font reportFont="Arial_Normal" size="10"/>

</textElement>

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

$F{type}

</textFieldExpression>

</textField>

  

 

the generated result is that:

 

pageHeader and a few of records from database are displayed in Page 1(supposed), with a large part of blank in this page, then followed by a couple of records from the same datasource displayed in Page 2, also with a large blank space, and the subreport ends in Page n(n>2)

 

each page can hold at least 20 records, but in my case ,the number of records differs from page to page, and the whole report looks like some scattered records mixed with blank space,

however , the pageHeader section was properly displayed in each page

 

can someone explain and help me solve that?

 

thanks a lot!!

//bow!!!

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