Jump to content
We've recently updated our Privacy Statement, available here ×

KKousa

Members
  • Posts

    2
  • Joined

  • Last visited

KKousa's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Solved! Had to set some system properties and include every friggin' .jar that Jasper uses increasing the overall size of my program to a whopping 27 MBs! All's well that ends well. -K-
  2. Hi! In a nutshell: Jasper Reports throws errors when my program is compiled to a .jar and run. The situation is this: I have integrated Jasper Reports 1.2.7 to my program. I use .jrxml report template (created with iReport 1.2.7) that is filled with a XMLDataSource. Everything goes fine and the report is printed when the program is run from Eclipse IDE. Problems arise when I compile the program to a .jar and try to run it. The errors complain about, not being able to find the compiled java sourcefiles(or so I have understood). Any ideas or suggestions to solve or circumvent this problem are very much appreciated. Thanks in advance. -K- P.S. Here's the code that is used to run Jasper Reports in my program. The error message is quite lengthy and is submitted in an attachement. private void printReport(){ String xmlFileName = workingDir + File.separator + "reports" + File.separator + "report.xml"; String recordPath = "/Report/Pieces/Piece/Edges/Edge"; String templatePath = workingDir + File.separator + "reports" + File.separator + "Sorted.jrxml"; try { FileInputStream xml = new FileInputStream(xmlFileName); JRXmlDataSource jrxmlds = new JRXmlDataSource(xml, recordPath); HashMap hm = new HashMap(); JasperReport report = JasperCompileManager.compileReport(templatePath); JasperPrint print = JasperFillManager.fillReport( report, hm, jrxmlds); JRPrinterAWT.printPages(print, 0, print.getPages().size()-1, true); } catch (JRException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } } [file name=Error.txt size=4860]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/Error.txt[/file]
×
×
  • Create New...