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

ramilash

Members
  • Posts

    1
  • Joined

  • Last visited

ramilash'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. posted Today 04:01 PM Profile for Shalimar Lagcao Email Shalimar Lagcao Send New Private Message Edit/Delete Post Reply With Quote I am new to Jasper reports. I copy a sample code on how to use jasper reports using Netbeans 5.5. Following the procedure and compile the application, and like magic, series of errors appear. Can you help me guys in solving this. Here is the code (very simple and yet have errors): HelloReportWorld.jrxml ----Start after this line---- <?xml version="1.0"?> <!DOCTYPE jasperReport PUBLIC "-//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="HelloReportWorld"> <detail> <band height="20"> <staticText> <reportElement x="180" y="0" width="200" height="20"/> <text><![CDATA[Hello World!]]></text> </staticText> </band> </detail> </jasperReport> ------- end here --------- Main.java ----Start after this line---- package reportapps; import java.util.HashMap; import net.sf.jasperreports.engine.JREmptyDataSource; import net.sf.jasperreports.engine.JRException; import net.sf.jasperreports.engine.JasperCompileManager; import net.sf.jasperreports.engine.JasperExportManager; import net.sf.jasperreports.engine.JasperFillManager; import net.sf.jasperreports.engine.JasperPrint; import net.sf.jasperreports.engine.JasperReport; /** * * @author shalimar */ public class Main { /** Creates a new instance of Main */ public Main() { } /** * @param args the command line arguments */ public static void main(String[] args) { JasperReport jasperReport; JasperPrint jasperPrint; try { jasperReport = JasperCompileManager.compileReport( "report/templates/HelloReportWorld.jrxml"); jasperPrint = JasperFillManager.fillReport(jasperReport, new HashMap(), new JREmptyDataSource()); JasperExportManager.exportReportToHtmlFile( jasperPrint, "report/results/simple_report.pdf"); } catch (JRException e) { e.printStackTrace(); } } } ------END HERE------------ COMPILER ERROR: ----Start after this line---- net.sf.jasperreports.engine.JRException: Error compiling report java source files : /home/shalimar/ReportApps/HelloReportWorld_1171871987558_150188.java at net.sf.jasperreports.engine.design.JRJavacCompiler.compileClasses(JRJavacCompiler.java:93) at net.sf.jasperreports.engine.design.JRAbstractClassCompiler.compileUnits(JRAbstractClassCompiler.java:67) at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:190) at net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:105) at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:211) at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:144) at reportapps.Main.main(Main.java:38) Caused by: java.io.IOException: java.io.IOException: javac: not found at java.lang.UNIXProcess.<init>(UNIXProcess.java:148) at java.lang.ProcessImpl.start(ProcessImpl.java:65) at java.lang.ProcessBuilder.start(ProcessBuilder.java:451) at java.lang.Runtime.exec(Runtime.java:591) at java.lang.Runtime.exec(Runtime.java:464) at net.sf.jasperreports.engine.design.JRJavacCompiler.compileClasses(JRJavacCompiler.java:62) ... 6 more ------END HERE---------- Can you help me on this? Thanks Shalimar
×
×
  • Create New...