vaishnav_piyush Posted August 6, 2007 Share Posted August 6, 2007 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 More sharing options...
lucianc Posted August 6, 2007 Share Posted August 6, 2007 Set positionType="Float" for the second subreport/text field. HTH,Lucian Link to comment Share on other sites More sharing options...
vaishnav_piyush Posted August 8, 2007 Author Share Posted August 8, 2007 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 More sharing options...
lucianc Posted August 10, 2007 Share Posted August 10, 2007 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,LucianPost edited by: lucianc, at: 2007/08/10 08:35 Link to comment Share on other sites More sharing options...
alexjonk Posted August 17, 2007 Share Posted August 17, 2007 Thanx for this post, it helped me a hole lot :) Link to comment Share on other sites More sharing options...
codyjasperForge Posted August 17, 2007 Share Posted August 17, 2007 http://jasperforge.org/sf/wiki/do/viewPage/projects.jasperreports/wiki/Sampleshttp://www.jasperassistant.com/docs/guide/index.html[This URL has been removed as it violates a JasperSoft copyright] These links have some useful info on them also...Post edited by: teodord, at: 2007/08/21 08:37 Link to comment Share on other sites More sharing options...
vk01 Posted November 9, 2007 Share Posted November 9, 2007 would this work the same if the subreports where placed in the "summary" part of the document? I have set the Position type to float for the second report but the data still overlaps. Thank you. Link to comment Share on other sites More sharing options...
lucianc Posted November 10, 2007 Share Posted November 10, 2007 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 More sharing options...
vk01 Posted November 10, 2007 Share Posted November 10, 2007 I have the first subreport-1[10,21] and subreport-2[10,61] coordinates - the data overlaps. any ideas would be much appreciated. Link to comment Share on other sites More sharing options...
lucianc Posted November 12, 2007 Share Posted November 12, 2007 vk01 wrote:I have the first subreport-1[10,21] and subreport-2[10,61] coordinates - the data overlaps. Please post the full subreport element coordinates (x, y, width, height). Regards,Lucian Link to comment Share on other sites More sharing options...
vk01 Posted November 12, 2007 Share Posted November 12, 2007 subreport-1 - (top,left, height, width) - (21, 10, 0, 0)subreport-2 - (top,left, height, width) - (51, 10, 0, 0) thank you - hoping we can get to the bottom of this. Link to comment Share on other sites More sharing options...
lucianc Posted November 12, 2007 Share Posted November 12, 2007 Try setting the widths of the subreport elements to 1. Regards,Lucian Link to comment Share on other sites More sharing options...
vk01 Posted November 12, 2007 Share Posted November 12, 2007 THANK YOU!!!! IT WORKED!!!! Why did this make a difference, setting width to 1? Why didn't setting the position type to FLOAT for the second subreport work? Thanks again!! Link to comment Share on other sites More sharing options...
lucianc Posted November 12, 2007 Share Posted November 12, 2007 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now