Jump to content
Changes to the Jaspersoft community edition download ×

Urgent-Why is jasper report not printing from executable jar ?


remasdiab

Recommended Posts

Hello 

I am able to print correctly jasper report from eclipse but when i exported the jar , i can not print . 

After research , i tried adding path of jasper library to enviroment variables , but also it did not work . Any idea why ?

Log from command prompt :

Exception in thread "AWT-EventQueue-0" Exception in thread "AWT-EventQueue-0"
Exception: net.sf.jasperreports.engine.JRRuntimeException thrown from the UncaughtExceptionHandler in thread "AWT-EventQueue-0"

code used(working perfectly inside eclipse)  :

try {              java.io.InputStream is = getClass().getResourceAsStream("/report/report.jrxml");                           JasperDesign jDesign = JRXmlLoader.load(is);                           JasperReport jr = JasperCompileManager.compileReport(jDesign);                             JasperPrint jp = JasperFillManager.fillReport(jr,parameters,new JRTableModelDataSource(jTable1.getModel()) );                JasperPrintManager.printReport(jp, true);                             } catch (JRException e2) {                e2.printStackTrace();             }[/code]
Link to comment
Share on other sites

  • 7 months later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

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...