Jump to content
Changes to the Jaspersoft community edition download ×

Dyanamic size of Subreports


vaishnav_piyush

Recommended Posts

Hi !!

 

I am a new user to Jasper Reports, and i am caught with a serious problem in my project.

 

I have a report template in which i've created two subreports, placed one below the other in detail band. I've set "split allowed = true" for the detail band and "isStretchWithOverflow = true" for both the subreports. But when the contents in upper subreport overflows, it overwrites the contents of the lower subreport. Is there any method to dyanamically shift down the lower report if the contents of first subreport overflows.

 

I'm also having a similar problem with text fields where i need to dyanamically shift down the contents of a text field if the contents of report part above it expands.

[file name=medicalRecordMain.jrxml size=22470]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/medicalRecordMain.jrxml[/file]

Link to comment
Share on other sites

  • Replies 13
  • Created
  • Last Reply

Top Posters In This Topic

Thanks you lucianc.... the solution to my problem that you suggested worked wonders... thanks again

 

it is so amazing to know that i had set almost 2 days trying different things to solve my problem and the solution was so easy.

 

can you do me one more favour... please suggest me some good reading material on developing jasper reports using ireport... i surfed the material readily available but didn't think that it is good enough to give one conceptual knowledge on jasper reports

Link to comment
Share on other sites

vaishnav_piyush wrote:

please suggest me some good reading material on developing jasper reports using ireport... i surfed the material readily available but didn't think that it is good enough to give one conceptual knowledge on jasper reports

 

I'm afraid I can't suggest anything more than what is on this page. The samples included in the JasperReports project distribution are also a good way of learning what JR can do and how it works.

 

Regards,

Lucian

Post edited by: lucianc, at: 2007/08/10 08:35

Link to comment
Share on other sites

  • 2 months later...

vk01 wrote:

would this work the same if the subreports where placed in the "summary" part of the document?

 

Yes.

 

Make sure that your subreport elements in the master JRXML do overlap on the horizontal/x axis and that the second is positioned under the first (with no vertical/y overlapping).

 

Regards,

Lucian

Link to comment
Share on other sites

vk01 wrote:

Why did this make a difference, setting width to 1?

 

As I said, the engine checks whether the two elements overlap on the horizontal axis. When the elements have 0 as declared width, they do not occupy any space on the horizontal axis, and therefore there is no overlap.

 

Code:
Why didn't setting the position type to FLOAT for the second subreport work?

 

Position type Float works only when the condition above (regarding the horizontal overlapping) holds.

 

Regards,

Lucian

Link to comment
Share on other sites

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