sangeethakrishna Posted March 14, 2012 Share Posted March 14, 2012 Hi ,We are upgrading jasper reports 3.1.7 to 4.5.0. JasperDesign.getDetailCode with Previous version: private JRDesignBand findBandForSubReport(JasperDesignBuilder jasperDesignBuilder, SubReport subReport) throws Exception { return (JRDesignBand) jasperDesign.getDetail(); }Change i have done with 4.5.0: private JRDesignBand findBandForSubReport(JasperDesignBuilder jasperDesignBuilder, SubReport subReport) throws Exception { JRDesignSection jrDesignSection = (JRDesignSection)jasperDesign.getDetailSection(); for(JRBand jrBand : jrDesignSection.getBands()) { if(jrBand instanceof JRDesignBand) { return (JRDesignBand)jrBand; } } }We are using same code for getHeaderSection, getFooterSection also.Please let me clarify the how to get JRDesignBand from JRDesignSectionPlease check the code above, let me know is that the correct way of getting JRDesignBand from JRDesignSection. 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