Jump to content
Changes to the Jaspersoft community edition download ×

problem with subreport in summary


Recommended Posts

By: Suneer A - suneer

problem with subreport in summary

2003-09-15 21:40

Hi,

 

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

 

 

<summary>

<band height="780">

<subreport isUsingCache="false">

<reportElement

mode="Transparent"

x="0"

y="20"

width="570"

height="560"

positionType="Float"

isPrintRepeatedValues="false"

isRemoveLineWhenBlank="false"

isPrintInFirstWholeBand="false"

isPrintWhenDetailOverflows="true"/>

 

<parametersMapExpression>$P{REPORT_PARAMETERS_MAP}</parametersMapExpression>

<subreportParameter name="printtexthandler">

<subreportParameterExpression>$P{printtexthandler}</subreportParameterExpression>

</subreportParameter>

<dataSourceExpression>

$P{REPORT_DATA_SOURCE}

</dataSourceExpression>

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

"D:\BeaWebLogic\wlserver6.1\config\mydomain\applications\DefaultWebApp\WEB-INF\classes\com\cc\reporttemplates\cc_subreport.jasper"

</subreportExpression>

</subreport>

</band>

</summary>

 

 

the subreport has the following lines...

 

<jasperReport

name="cc_subreport"

pageWidth="595"

pageHeight="842"

columnWidth="555"

leftMargin="20"

rightMargin="20"

topMargin="30"

bottomMargin="30"

isSummaryNewPage="true">

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

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

<groupHeader>

<band height="80">

<staticText>

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

<textElement textAlignment="Left">

<font reportFont="Arial_Bold"/>

</textElement>

<text>Title****</text>

</staticText>

</band>

</groupHeader>

<groupFooter/>

</group>

<detail>

<band height="20">

</band>

</detail>

</jasperReport>

 

 

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

 

Please help!

 

Thanks in advance,

Suneer

 

 

 

 

 

By: Suneer A - suneer

RE: problem with subreport in summary

2003-09-16 22:42

Hi,

 

I Tried with a simpler master and subreport with the master report having only a group and a summary section. The same 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? I would be greatfull if u can share ur experiences.

 

Thanks in advance,

Suneer

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