cmaclellan Posted February 15, 2007 Share Posted February 15, 2007 I'm using JDeveloper to create my reports. I am able to make a single report just fine, but I am unsure how to code it to use SubReports. here is my code for a single report.Code: URL jarUrl = getClass().getResource("catalog.xml"«»); URLConnection urlConn = jarUrl.openConnection(); InputStream input = urlConn.getInputStream(); JasperDesign design = JRXmlLoader.load(input); JasperReport report = JasperCompileManager.compileReport(design); Map parameters = new HashMap(); parameters.put("ReportTitle", "PDF JasperReport"«»); JasperPrint print = JasperFillManager.fillReport(report, parameters, conn); OutputStream output = new FileOutputStream(new File("C:/catalog.pdf"«»)); JasperExportManager.exportReportToPdfStream(print, output); output.close(); Link to comment Share on other sites More sharing options...
Teodor Danciu Posted February 19, 2007 Share Posted February 19, 2007 Hi, Please check our sample in the /demo/samples/subreport folder of our project distribution package. I hope this helps.Teodor 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