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

land-of-mordor

Members
  • Posts

    3
  • Joined

  • Last visited

land-of-mordor'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. As I say before, updating Adobe Reader didn't fix the issue. This is quite strange...I don't know what to do...
  2. Thanks for replying!! I think my problem it's not related with the issue you saying. I'm not using any web-related stuff, just a simply application to be run on a desktop. So I think the Adobe version I've installed in the PC won't be the cause. But this afternoon I'll update Adobe Reader and see what happend.
  3. I'm coding an application using Netbeans as IDE to deal and interchange data between an Access database and a PBX software that uses firebird. Everything was fine until I reached the reports issue. Working in Netbeans IDE everything worked really fine. Report is created and converted to the file type I wanted (rtf, odt, pdf...), but when a take the content of the "dist" folder (where the compiled application is stored by Netbeans with all the needed libraries) and execute the application, the report is created sucessfully but when it try to save it as PDF file, the only output is a empty (0 kb occupied) PDF file. I tried with other file types, like rtf and odt, and the application works great in both situations, runned using Netbeans IDE and as a stand-alone application. Is there an specific library or reference that is loaded in Netbeans IDE but not imported when compiled as a stand-alone application? may be is another silly thing? any help or thoughts? Thanks. Code://IMPORT SECTIONpackage contactosagenda;import java.awt.Cursor;import java.awt.Desktop;import java.io.File;import java.util.logging.Level;import java.util.logging.Logger;import javax.swing.ImageIcon;import javax.swing.JOptionPane;import javax.swing.UIManager;import javax.swing.plaf.DesktopPaneUI;import net.sf.jasperreports.engine.*;import net.sf.jasperreports.engine.export.JRPdfExporter;import net.sf.jasperreports.engine.util.JRLoader;import net.sf.jasperreports.engine.export.oasis.JROdtExporter;//REPORT LAUNCHERprivate void lanzaInforme(Clientes listado){ try { JasperReport informe = (JasperReport)JRLoader.loadObject(new File(System.getProperties().getProperty("user.dir") + System.getProperty("file.separator")+"reportClientes.jasper")); JRDataSource j = listado.getReportDataSource(); JasperPrint reportPrint = JasperFillManager.fillReport(informe,null,j); //JRExporter export = new JRPdfExporter(); //JRExporter export = new JRRtfExporter(); JRExporter export = new JROdtExporter(); export.setParameter(JRExporterParameter.JASPER_PRINT, reportPrint); String ruta = System.getProperties().getProperty("user.dir") + System.getProperty("file.separator") + "temp.odt"; //File f = File(ruta); export.setParameter(JRExporterParameter.OUTPUT_FILE, new File(ruta)); export.exportReport(); //Desktop.getDesktop().open(new File(ruta)); //JOptionPane.showMessageDialog(this.getParent(),"El archivo debe estar en\n" + f.getPath()); } catch (Exception ex) { JOptionPane.showMessageDialog(this.getParent(), "Se ha producido el siguiente error:\n" + ex); Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex); } }
×
×
  • Create New...