getting null values in JRXML to java

0

Hi 

  I'm getting null values when i compile my JRXML and print it to PDF via java.

 

package com.test;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
 
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;
 
public class PdfFromJasperFile {
  public static void main(String[] args) throws JRException, IOException {
 
 JasperReport jasperReport;
   JasperPrint jasperPrint;
   Map param = new HashMap();
   try{
       String sourceFileName = "C:/Users/Sadagopan/Documents/report3.jrxml";
 
       jasperReport = JasperCompileManager.compileReport(sourceFileName);
        jasperPrint = JasperFillManager.fillReport(jasperReport,  param, 
           new JREmptyDataSource());
           JasperExportManager.exportReportToHtmlFile(jasperPrint, "C:/Users/Sadagopan/Documents/sample.html");        
       
       
   }
   catch(Exception e){
    e.printStackTrace();
   }
 
 
  }
 
}
 

 

my JRXML file <band height="60" splittype="Stretch"><statictext><reportelement uuid="a006c204-9feb-4302-90b1-fe5bdddbe3d8" x="89" y="11" width="384" height="49"></reportelement><textelement><font size="36"></font> </textelement><text></text></statictext></band>
Attachments: 
88.srivatsan's picture
Joined: Feb 7 2013 - 10:14pm
Last seen: 6 years 8 months ago

0 Answers:

No answers yet
Feedback
randomness