islam69 Posted January 26, 2010 Share Posted January 26, 2010 how are youi am using Servlet and i use this code to chage aliment for my report JasperDesign design = JRXmlLoader.load(input); JasperReport report = JasperCompileManager.compileReport(design); JRField[] jrFieldList = design.getFields(); JRField field = jrFieldList[1]; field.getPropertiesMap().setProperty("align","right");but i have subreport in this report how can i change the align for it wile the main report together because the align is change from main report only Code: JasperDesign design = JRXmlLoader.load(input); JasperReport report = JasperCompileManager.compileReport(design); JRField[] jrFieldList = design.getFields(); JRField field = jrFieldList[1]; Link to comment Share on other sites More sharing options...
goompas Posted January 26, 2010 Share Posted January 26, 2010 Use scriptlet in subreport. Then you have acces to JasperReport object representing subreport. public void beforeReportInit() throws JRScriptletException { try { JasperReport report = (JasperReport) this.getParameterValue("JASPER_REPORT"); } catch (Exception e) { } } Link to comment Share on other sites More sharing options...
demon1stvfw Posted January 11, 2011 Share Posted January 11, 2011 sorry I am still new to jasperreports and would like to know how can I access the report variable after that? Edit: Solved. Found a workaroundPost Edited by demon1stvfw at 01/11/2011 22:42 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