Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Java Basics
Java Basics General beginning Java language questions that don't fit in one of the more specific forums. Please specify what version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 14th, 2008, 04:34 AM
Registered User
Join Date: Apr 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default jasper report with netbeans 5.0

please help
net.sf.jasperreports.engine.JRException: Could not load object from location : Purchase_Supp_Add.jasper

 try {
                Statement stmt;
                String url = "jdbc:mysql://localhost:3306/Salesreport";
                Connection con =DriverManager.getConnection(url,"root", "root");
                stmt = con.createStatement();
// JasperReport subreport = null;
// ResultSet rs = stmt.executeQuery("select *from suppdetails_tbl where cpy_name= '"+Supplier_po.getSelectedItem()+"'");
// String reportSource = "D:\\Sales Report Tool March 20\\report\\Jasp report\\purchase.jrxml";
                String reportDest = "D:\\Sales Report Tool March 20\\report\\Jasp report\\purchase.pdf";
                String reportSource ="D:\\Sales Report Tool March 20\\report\\Jasp report\\purchase.jrxml";
                String reportSource1 ="D:\\Sales Report Tool March 20\\report\\Jasp report\\Purchase_Supp_Add.jasper";

                JasperReport jasperReport =JasperCompileManager.compileReport(reportSource);
// JasperReport jasperReport1 =JasperCompileManager.compileReport(reportSource1) ;
                 Map parameter = new HashMap();
                  //parameter for master report
                 Object a=Po_comb.getSelectedItem();
                parameter.put("Ponum", a);
                 //parameter for subreport
                parameter.put("sub", "reportSource1");
                JasperPrint print = JasperFillManager.fillReport(jasperReport, parameter, con);

                System.out.println("Crossed 6");
                JasperExportManager.exportReportToPdfFile(print, reportDest);

                System.out.println("Crossed 7");
                System.out.println("Crossed 8");
            } catch (JRException e)

            // Exception handling for the Class.forName method.
            catch (ClassNotFoundException ex)

            // Exception handling for the DriverManager.getConnection method.
            catch (SQLException ex)

my mail id is :[email protected]


Similar Threads
Thread Thread Starter Forum Replies Last Post
JASPER REPORT with PHP loocsim PHP How-To 5 January 13th, 2010 05:16 AM
help needed........ Regarding jasper report gita_Sathyam Java Basics 2 June 19th, 2008 05:20 AM
Problem with jasper report print Anand Raj J2EE 0 May 26th, 2008 02:44 AM
Jasper report compatibilty problem pks_it J2EE 0 January 30th, 2008 09:17 AM
jasper report [email protected] J2EE 0 February 3rd, 2005 06:48 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.