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

berdohan

Members
  • Posts

    3
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by berdohan

  1. try { JRXmlDataSource jrxmlds = new JRXmlDataSource(xmlFileName,recordPath); JasperPrint print = JasperFillManager.fillReport(reportFileName,hm,jrxmlds); JRExporter exporter= new JRPdfExporter(); exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME,outFileName); exporter.setParameter(JRExporterParameter.JASPER_PRINT,print); exporter.exportReport(); Runtime r = Runtime.getRuntime(); try { String app = {"C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe",outFileName}; Process process = r.exec(app); System.out.println("app= "+app); }catch (Exception ee){} } catch (JRException ex1) { ex1.printStackTrace(); System.exit(1); } catch (Exception ex2) { ex2.printStackTrace(); System.exit(1); } }
  2. Hi all; I am interesting to create a PDF file from java class using .jasper file.Also my datasource is a XML file datasource. I particularly managed to do it. My jasper file works exactly when I execute jrxml file in IReport3..0.0. It creates and views my report that filled up with correct data. If I try to get my report calling from java.class , report looks like empty columns and number of data amount *2. Here is my codes and other files are been athachment to msg. Does anyone tell me how I get my report with correct data and use the variable xmldatasource file? Best regards. berdohan Code:
×
×
  • Create New...