Jump to content
Changes to the Jaspersoft community edition download ×

Jdeveloper Creating JasperReport


Recommended Posts

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.

        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);
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...