Jump to content
Changes to the Jaspersoft community edition download ×

probelm with subreport in summary section

Recommended Posts

By: Suneer A - suneer

probelm with subreport in summary section

2003-09-15 06:23



I am using jasper reports for printing in pdf format. I have a summary section which is quite large. So I put it in a subreport and included in the master report. But, the contents of the subreport are not getting printed. what could be the reason?

The relevent parts of the master and subreports are given below:



The master report has the following lines for summary part...





<band height="780">

<subreport isUsingCache="false">














<subreportParameter name="printtexthandler">






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








the subreport has the following lines... even this simple section is also not working...












<reportFont name="Arial_Bold" isDefault="false" fontName="Arial" size="8" isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1252" isPdfEmbedded="false"/>

<reportFont name="Arial_Normal" isDefault="false" fontName="Arial" size="8" isBold="false" pdfFontName="Helvetica" pdfEncoding="Cp1252" isPdfEmbedded="false"/>

<reportFont name="Arial_Big_Normal" isDefault="false" fontName="Arial" size="10" isBold="false" pdfFontName="Helvetica" pdfEncoding="Cp1252" isPdfEmbedded="false"/>

<reportFont name="Arial_Big_Bold" isDefault="false" fontName="Arial" size="12" isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1252" isPdfEmbedded="false"/>

<group name="SummaryGrp" minHeightToStartNewPage="10" isStartNewPage="true">



<band height="80">


<reportElement positionType="Float" mode="Opaque" x="30" y="50" width="60" height="10"/>

<textElement textAlignment="Left">

<font reportFont="Arial_Bold"/>









<band height="20">






am I missing something? I tried many possibilities, like changing subreport height and band height etc., but not working!! is there a problem with the way I have given mode?


Please help!


Thanks in advance,







By: Suneer A - suneer

RE: probelm with subreport in summary section

2003-09-16 22:33

I Tried with a simpler master and subreport with the master report having only a group and a summary section. The subreport is included in the master report at two places. One in the <groupFooter> of the master report and then in the <summary> section of the master report.

The subreport is generated as expected in the <groupFooter> section. But in the <summary> section it is giving me a blank page.

Any suggestion why this is happening...

The <subreport> element in both the places are the same except the mode attribute.


has anybody have any such experience with subreport summary section?


Thanks in advance,







By: Teodor Danciu - teodord

RE: probelm with subreport in summary section

2003-09-28 03:33




Why are you supplying the REPORT_DATA_SOURCE

to your subreport. Are you sure you want to do this?


It means that the subreport will take over and

continue to iterate in the master report data source. This could make your master report finish sooner than expected.


If you put the subreport in the summary section,

the master report data source has already reached

the last record and the subreport will have nothing

to iterate on. This is why it does not print.

If you want it to print something anyway,

use whenNoDataType="AllSectionsNoDetail" in

your subreport definition.


I hope this helps.







By: Suneer A - suneer

RE: probelm with subreport in summary section

2003-10-01 04:27

Hi Teodor,


It worked!!

Yes, there was no need for supplying the REPORT_DATA_SOURCE to the subreport.

thanks for pointing it out.

Thank you very much for the advice and spending ur valueable time for this..



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