hovendal Posted July 13, 2009 Share Posted July 13, 2009 Hi all, First of, I am pretty new to JasperReports, so please bare with me, if I have missed something crucial - but I cant seem to find anything on this issue.I have a master report, with a subreport with a nested subreport. Pretty straight forward and it all works like a charm, but one thing! For each of the subreports the left margin is moved an inch or so to the right, like when dooing bulletins with more levels: Master Subreport 1 Subreport So my alignments from the master reports Coloumnheader band doesn't really do the trick :) Ofcourse, this is something i am dooing wrong - but what. Here is how I include the subreports (please dont mind the passed variables and or the setting of the new JRBeanDataSource):The subreports are all placed in the detail band! Thanks alot in advance for your help - it is much appreciated!Code:In master report: <detail> <band splitType="Stretch" height="50"> <subreport> <reportElement key="sub_buildings" x="0" y="0" width="497" height="50"/> <subreportParameter name="REPORT_RESOURCE_BUNDLE"> <subreportParameterExpression><![CDATA[$P{REPORT_RESOURCE_BUNDLE}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="floors"> <subreportParameterExpression><![CDATA[$F{theFloors}]]></subreportParameterExpression> </subreportParameter> <dataSourceExpression><![CDATA[new JRBeanCollectionDataSource($F{theBuildings})]]></dataSourceExpression> <subreportExpression class="java.lang.String"><![CDATA["buildings.jasper"]]></subreportExpression> </subreport> </band> </detail>subreport 1: <detail> <band height="25" splitType="Stretch"> <subreport> <reportElement key="sub_floors" x="0" y="0" width="497" height="25"/> <subreportParameter name="REPORT_RESOURCE_BUNDLE"> <subreportParameterExpression><![CDATA[$P{REPORT_RESOURCE_BUNDLE}]]></subreportParameterExpression> </subreportParameter> <dataSourceExpression><![CDATA[new JRBeanCollectionDataSource($F{floors})]]></dataSourceExpression> <subreportExpression class="java.lang.String"><![CDATA["floors.jasper"]]></subreportExpression> </subreport> </band> </detail> Link to comment Share on other sites More sharing options...
Teodor Danciu Posted July 13, 2009 Share Posted July 13, 2009 Hi, Your subreports templates have a margin set. Check the leftMargin and topMargin properties. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
hovendal Posted July 13, 2009 Author Share Posted July 13, 2009 They indeed dit have margins set! Stupid me :) Thanks alot! Link to comment Share on other sites More sharing options...
ahampannavar Posted December 18, 2012 Share Posted December 18, 2012 Can you please describe me how did you solve that problem. Thanks, Abhi 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