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

llokk2007

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

Security Advisories

Downloads

Everything posted by llokk2007

  1. abhimanyu.prasad, I make a template in iReport, so I don't think its a reason, because when I make for example "PDF Preview" PDF creates correctly...in "report Query" I set "XPath", nodes of XML "tree", drug-and-drop fields, then in report I add fields to DetailField...
  2. Hello, I need some help:) I try to make pdf/html file from XML file in pdf I can see names of colomns, but in nodes: NULL NULL NULL NULL what can I do? p.s. sorry for my English))) my code: //so datasource is a way to XML file, xpath = "XPath", template is a way to .jrxml file, resultpath - name of report file(ends with .pdf or .html) public static void printpdfhtml(String datasource, String xpath, String template, String resultpath) { try { JRXmlDataSource ds = new JRXmlDataSource(datasource); JasperReport jasperReport = JasperCompileManager.compileReport(template); JasperPrint print = JasperFillManager.fillReport(jasperReport, new HashMap(), ds); if(resultpath.toLowerCase().endsWith("pdf")) JasperExportManager.exportReportToPdfFile(print, resultpath); else JasperExportManager.exportReportToHtmlFile(print, resultpath); } catch (JRException e) { log.info("Исключительная ситуация",e); e.printStackTrace(); } }
×
×
  • Create New...