Jump to content
We've recently updated our Privacy Statement, available here ×

Recommended Posts

By: Avinash - gavinash


2003-01-03 15:39


I'm new to JasperReports. I was trying to learn to use subreports in my reports. So I created a report with static texts in it's title and am now trying to embed this report in a MasterReport. It compiles and fills allright byt when I try to view it the subreport does not appear. Can someone give me a direction to solve this problem.

Here;s my subreport and the master report :

<?xml version="1.0"?>

<!DOCTYPE jasperReport PUBLIC "-//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">












<band height="15">


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

<textElement textAlignment="Right" lineSpacing="Single">

<font size="12"/>


<text>Part of Subreport</text>







Place where i embed the above subreport into the Master:

<group name="CountryGroup" isStartNewColumn="true" isResetPageNumber="true" isReprintHeaderOnEachPage="false" minHeightToStartNewPage="200">





<band height="155">


<subreport isUsingCache="false">

<reportElement x="300" y="5" width="150" height="15"/>




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






Thank You







By: Teodor Danciu - teodord

RE: Subreports

2003-01-06 08:32




The master report displays anything at all?

Does the master report data source contain any

records in it?


Thank you,







By: Avinash - gavinash

RE: Subreports

2003-01-06 09:21


Yes the master reports does have data and it does display it. Also if I get a pdf out of the report the subreport data appears with data properly in the pdf but the viewer does not show the subreport

at all.

Is there something that I'm missing.


Thank You







By: Teodor Danciu - teodord

RE: Subreports

2003-01-06 09:33




The fact that some data appears in PDF, but not

in the JasperViewer is indeed a little weird.


May I see the PDF and maybe a screenshot of the

report in JasperViewer ?

If you could export the report to XML format

and send it to me it could be even better.




Thank you,







By: Avinash - gavinash

RE: Subreports

2003-01-06 11:20

Thanks to Teodord, I fixed it. The problem was that the elements had heights of 15 and font size of 12 and apparently font size 12 takes a couple of more pixels than 15 to fit. I changed them to 17 and now it does appear in the viewer.



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