leaoas Posted September 15, 2010 Share Posted September 15, 2010 Hello!I'm migrating some reports from JasperReports 2.0.2 to 3.7.4.Some of them create and define group header and footer programmatically. Example: JRDesignGroup myGroup = new JRDesignGroup(); JRDesignBand myGroupHeader = new JRDesignBand(); ... JRDesignBand myGroupFooter = new JRDesignBand(); ... myGroup.setGroupHeader(myGroupHeader); myGroup.setGroupFooter(myGroupFooter); The methods setGroupHeader and setGroupFooter are deprecated.Javadoc only says that they were replaced by JRBaseGroup.getGroupHeaderSection() and JRBaseGroup.getGroupFooterSection().I'm not seeing how I can set a group header/footer after calling getGroupHeaderSection/getGroupFooterSection.Someone has an example? Link to comment Share on other sites More sharing options...
szaharia Posted September 15, 2010 Share Posted September 15, 2010 Try with((JRDesignSection)group.getGroupHeaderSection()).addBand(myGroupHeader);Regards,sanda Link to comment Share on other sites More sharing options...
leaoas Posted September 16, 2010 Author Share Posted September 16, 2010 Thanks!It worked perfectly. 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