2006 IR Open Dicussion Posted August 26, 2006 Share Posted August 26, 2006 By: msprasanth - msprasanth How to set Hori/Vertical align in program ? Â 2006-01-11 14:11 Hello, ÂÂI am trying to take the alignment from user and manipulate report at run-time using the Java API provided. ÂÂjasperReport = JasperCompileManager.compileReport(jasperDesign); ÂJRBand detailBand = jasperReport.getDetail(); ÂÂJRBaseElement element = (JRBaseElement) detailBand.getElementByKey("name"); ÂJRBaseStyle alignment = (JRBaseStyle) element.getStyle(); ÂÂand alignment is NULL... because when i try to do a element.setX(50) its not throwing and exception but, when i try to do a alignment.setHorizontalAlignment(JRAlignment.HORIZONTAL_ALIGN_LEFT)... it throws a NULLPOINTEREXCEPTION !! ÂÂAny clue ?? ÂÂThank you. Â Link to comment Share on other sites More sharing options...
Gustaf Posted June 14, 2007 Share Posted June 14, 2007 Use iReports to make a template for your report first. 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