atiquek Posted February 19, 2012 Share Posted February 19, 2012 Hi there, I have a main report (Master.jrxml) which needs to place two subreports (subreport1.jrxml & subreports2.jrxml) side by side. The first subreport contains a bar chart while the second one contains some further information related to the chart and needs to be displayed to the right of the chart or subreport1. Could someone please suggest how do I place the two subreports so that they dont overlap. Thanks, Atique Link to comment Share on other sites More sharing options...
mennei Posted February 19, 2012 Share Posted February 19, 2012 Try to use frames, So the subreports will be in frames.Good luck. Link to comment Share on other sites More sharing options...
atiquek Posted February 19, 2012 Author Share Posted February 19, 2012 Thanks Mennei for your quick response. I tried frames but no luck. The second one is written over the first one which takes the whole width of the master report. Link to comment Share on other sites More sharing options...
mennei Posted February 19, 2012 Share Posted February 19, 2012 To make things clear, if the second subreport will contain minimum data, it woun't overlap? Link to comment Share on other sites More sharing options...
atiquek Posted February 19, 2012 Author Share Posted February 19, 2012 The second subreport has very minimum data as shown in the attached file. The black rectangle contains the second subreport data. you can see the first one takes the entire width of the report. Link to comment Share on other sites More sharing options...
mennei Posted February 19, 2012 Share Posted February 19, 2012 What is the widht of the main report? what is the width and height of the first and second subreports? Can you attach the jrxml? Link to comment Share on other sites More sharing options...
atiquek Posted February 19, 2012 Author Share Posted February 19, 2012 The files are attached. I have a ChartCustomiser in the report, please remove it to run the report. Link to comment Share on other sites More sharing options...
mennei Posted February 19, 2012 Share Posted February 19, 2012 What I can tell you without run the reports, is that in the master you have 219 px for the second subreport (subreport1), and in the subreport himself the widht define 250 px (you can see it, when you choose the subreport himself in iReport report inceptor). Try to adjust this value. Link to comment Share on other sites More sharing options...
atiquek Posted February 19, 2012 Author Share Posted February 19, 2012 Changing the width didnt help either. Link to comment Share on other sites More sharing options...
mennei Posted February 19, 2012 Share Posted February 19, 2012 So try to make sure that all report's orientation attribute is set to "portrait". Link to comment Share on other sites More sharing options...
atiquek Posted February 19, 2012 Author Share Posted February 19, 2012 Even portraint didnt help either. Link to comment Share on other sites More sharing options...
mennei Posted February 20, 2012 Share Posted February 20, 2012 Hi,I got fresh look in this case, and want to say to you that I have more than two subreports side by side and they not overlops. What I'm doing is to match to total width of the master report to the subreports. In this case the master widht is A4 so it 595 px - 40 px (margin left and right), so you have 555 px to divide between both subreport. If the first subreport widht get 475 px, you have to give the second 555-475 = 80 px. NOT 219 px as I said before. (I was consider a space between subreports).Also, I notice that the second subreport not contain frame.The orientation in my reports is "protriat" as I said.Good luck. Link to comment Share on other sites More sharing options...
Solution atiquek Posted February 20, 2012 Author Solution Share Posted February 20, 2012 You are correct. It was mainly a width problem. When I changed the master report to landscape it started working and have fixed the issue. Your advice/suggestion is highly appreciated. 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