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

VMASTER

Members
  • Posts

    17
  • Joined

  • Last visited

VMASTER's Achievements

Apprentice

Apprentice (3/14)

  • First Post Rare
  • Collaborator Rare
  • Conversation Starter Rare
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. Hi, my project, including jasper, it run perfectly with netbeans the jar, created by netbeans, does not work and gives this error Code: Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: net/sf/ja sperreports/engine/JRException at... the manifest-mf is : Code:[code] Manifest-Version: 1.0 Ant-Version: Apache Ant 1.7.0 Created-By: 10.0-b22 (Sun Microsystems Inc.) Main-Class: Main Class-Path: lib/ant-1.5.1.jar lib/antlr-2.7.5.jar lib/batik-anim.jar l ib/batik-awt-util.jar lib/batik-bridge.jar lib/batik-css.jar lib/bati k-dom.jar lib/batik-ext.jar lib/batik-gvt.jar lib/batik-parser.jar li b/batik-script.jar lib/batik-svg-dom.jar lib/batik-svggen.jar lib/bat ik-util.jar lib/batik-xml.jar lib/bsh-2.0b4.jar lib/commons-beanutils -1.7.jar lib/commons-collections-2.1.jar lib/commons-digester-1.7.jar lib/commons-javaflow-20060411.jar lib/commons-logging-1.0.2.jar lib/ commons-logging-api-1.0.2.jar lib/groovy-all-1.5.5.jar lib/hibernate3 .jar lib/hsqldb-1.7.1.jar lib/itext-1.3.1.jar lib/jakarta-bcel-200508 13.jar lib/jasperreports-3.0.0.jar lib/jaxen-1.1.1.jar lib/jcommon-1. 0.0.jar lib/jdt-compiler-3.1.1.jar lib/jfreechart-1.0.0.jar lib/jpa.j ar lib/jxl-2.6.jar lib/mondrian-2.3.2.8944.jar lib/png-encoder-1.5.ja r lib/poi-3.0.1-FINAL-20070705.jar lib/saaj-api-1.3.jar lib/servlet.j ar lib/xalan.jar lib/xercesImpl.jar lib/xml-apis-ext.jar lib/xml-apis .jar X-COMMENT: Main-Class will be added automatically by build why doesnt' work?
  2. lshannon wrote: Were these reports created with iReport? I am unable to open them in iReport, I get an error about the columns and margins not fitting into the page. yes, with iReport and i don't have error about margins but i see only the title (Scheda Cliente) of the page :(
  3. lshannon wrote: There is an option to upload images or files at the bottom of the message window when you are making a posting to this forum. You can use that to upload the main report file. Attached is a zip with the complete subreport examples files that ship with JR including the java code to run them. I hope this will help. I had already seen to that but not me it was very helpful: ( In any case this is the main subreport and with the code that tries to see them : [file name=help.zip size=25053]
  4. lshannon wrote: What sort of datasource expression are you using for the subreport? SQL query, it should collect data from the main report Perhaps you could upload the JRXML for the main report? and how? ps: can you make me see an example, in java, for displaying a report with 3 subreport?
  5. lshannon wrote: I am not sure I understand the question. Do you mean in your main report you have a subreport, and when the main report is filled nothing is showing up for the subreport (and you are expecting the subreport to display some data)? yes, the main report contains only 3 subreport and i don't know how load the data in the subreport!
  6. This is the code : Code: this is the result : Code: I think that the subreport does not load the data! how can load data subreport and then insert them in the file .jasper?
  7. lucianc wrote: You said you put default.jasperreports.properties on the application classpath. How exactly did you do that? I found the file default.jasperreports.properties inside jar (source) and I inserted in application classpath (c:myprojectsrc) with a simple copy and paste
  8. lucianc wrote: VMASTER wrote: I reloaded the original file but does not work equally As I don't know what exactly you are doing, I'm going to need a detailed test case to reproduce your problem. ok , I executed the following steps : 1) download source from sourceforge 2) insert all files in a netbeans project 3) import all jar that jasper require 4) run this code : Code: public void runReport(String databaseName, String userName, String password, String reportFile, String empID) { try { String report = reportFile; HashMap reportParam = new HashMap(); reportParam.put("EMPID", empID); Connection jdbcConnection = connectDB(databaseName, userName, password); File sourceFile = new File(report); JasperReport jasperReport4 = (JasperReport) JRLoader.loadObject(sourceFile); JasperPrint jasperPrint2 = JasperFillManager.fillReport(jasperReport4, reportParam, jdbcConnection); int lar = (int) Toolkit.getDefaultToolkit().getScreenSize().getWidth(); int alt = (int) Toolkit.getDefaultToolkit().getScreenSize().getHeight(); myJRViewer jrv = new myJRViewer(jasperPrint2); jrv.setPreferredSize(new Dimension(lar - 50, alt - 50)); JScrollPane reportScroll = new JScrollPane(jrv); JPanel viewer = new JPanel(); viewer.add(reportScroll); JFrame finestra = new JFrame(); finestra.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); finestra.setTitle("STAMPA - ASTER SOFTWARE"«»); finestra.add(viewer); finestra.pack(); finestra.setVisible(true); finestra.repaint(); System.out.println("5"«»); System.exit(0); } catch (Exception ex) { String connectMsg = "Could not create the report " + ex.getMessage() + "n " + ex.toString() + "n" + ex.getCause() + "n" + ex.fillInStackTrace(); System.out.println(connectMsg); } } 5) this is the result Code:[code] Exception in thread "main" java.lang.ExceptionInInitializerError at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:400) at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:77) at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:59) at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:147) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:57) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402) at ReportDriver2.runReport(ReportDriver2.java:134) at ReportDriver2.main(ReportDriver2.java:257) Caused by: net.sf.jasperreports.engine.JRRuntimeException: Error loading the propertiesDefault properties file not found trovato Default properties file not found at net.sf.jasperreports.engine.util.JRProperties.initProperties(JRProperties.java:183) at net.sf.jasperreports.engine.util.JRProperties.<clinit>(JRProperties.java:150) ... 8 more Caused by: net.sf.jasperreports.engine.JRException: Default properties file not found at net.sf.jasperreports.engine.util.JRProperties.getDefaults(JRProperties.java:219) at net.sf.jasperreports.engine.util.JRProperties.initProperties(JRProperties.java:160) ... 9 more Java Result: 1
  9. You should just place defaults.jasperreports.properties on your application's classpath. ok! done Since you've changed the JRProperties source code, I'm afraid I can't tell you why it doesn't work. I reloaded the original file but does not work equally :(
  10. lucianc wrote: Why would you change JRProperties? default.jasperreports.properties is placed inside the JasperReports jar, you don't need to change any JR source files for the default properties to be found. Regards, Lucian because I downloaded the sources and I am trying to make it work without the jar :P however, the file .properties does not find :(
  11. Hi, when i use this code Code: JasperPrint jasperPrint2 = JasperFillManager.fillReport(jasperReport4, reportParam, jdbcConnection); the result is : Code:[code] Exception in thread "main" java.lang.ExceptionInInitializerError at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:400) at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:77) at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:59) at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:147) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:57) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402) at ReportDriver2.runReport(ReportDriver2.java:134) at ReportDriver2.main(ReportDriver2.java:257) Caused by: net.sf.jasperreports.engine.JRRuntimeException: Error loading the propertiesDefault properties file not found trovato Default properties file not found at net.sf.jasperreports.engine.util.JRProperties.initProperties(JRProperties.java:183) at net.sf.jasperreports.engine.util.JRProperties.<clinit>(JRProperties.java:150) ... 8 more Caused by: net.sf.jasperreports.engine.JRException: Default properties file not found at net.sf.jasperreports.engine.util.JRProperties.getDefaults(JRProperties.java:219) at net.sf.jasperreports.engine.util.JRProperties.initProperties(JRProperties.java:160) ... 9 more Java Result: 1 I placed the files default.jasperreports.properties in the folder src project but can not find I changed the file JRProperties in this way: Code:[code] String curDir = System.getProperty("user.dir"«»); System.out.println("nIn questo momento ti trovi nella directory:"«»); System.out.println(" - " + curDir); String files=curDir+"/default.jasperreports.properties"; System.out.println(" - " + files); InputStream is = JRProperties.class.getResourceAsStream(files); but not find the file! why?
  12. thanks for your reply. but I do not understand the argument "ds" is a datasource? or destination file? In any case the problem is to find a faster way to perform the following statement: Code: JasperPrint jasperPrint2 = JasperFillManager.fillReport(report, reportParam, jdbcConnection); suggestions?
×
×
  • Create New...