In this java code I get error in Eclipse IDE

 

[code]

  HashMap<String,String> parameters = new HashMap<String,String>();

  InputStream reportStream = new FileInputStream("yourReportFile.jrxml");

  // Bing the datasource with the collection

  JRDataSource datasource = new JRBeanCollectionDataSource(voList, true);

  // Compile and print the jasper report

  JasperReport report = JasperCompileManager.compileReport(reportStream);

  JasperPrint print = JasperFillManager.fillReport(reportStream, parameters,datasource);  // compile error here

  JasperPrintManager.printReport(print, true);

[/code]

 

compile error

The method fillReport(InputStream, Map<String,Object>, JRDataSource) in the type JasperFillManager is not applicable for the arguments (InputStream, HashMap<String,String>, JRDataSource)

 

What is the issue ?

 

I am using jasperreports 6.1.0

FacebookTwitterLinkedin
Pin It
Joomla Tutorials for Beginners