Jump to content

Problem with JasperFillManager


rfilgueiras

Recommended Posts

Hello,

 I have the next code with  JasperReport:

------------------------------------------------------------------

JasperPrint jasperPrint = null;

JasperReport jasperReport;

String reportStream = getServletConfig().getServletContext().getRealPath("/ireport/report3_.jasper");

jasperReport = (JasperReport) JRLoader.loadObject(new FileInputStream(reportStream ));

con = ConnectionFactory.getInstance().getConnection();

 Map parameters = new HashMap();parameters.put("fecha_ini", _finicio);

 jasperPrint = JasperFillManager.fillReport(jasperReport,parameters ,con);

 System.out.println("fillreport");

 response.setContentType("application/pdf");

OutputStream oS = response.getOutputStream();

JasperExportManager.exportReportToPdfStream(jasperPrint, oS);

--------------------------------------------------------------

The method loadObject returns an object not null, but when I execute the line JasperFillManager.fillReport it fails. It doesnt return anything and the output (in my browser) is the next

 

Error de lectura XML: no se encuentra elemento
Ubicación:

Número de línea 1, columna 1:
^

Anyone can help me?

Thanks in advance,

Rodrigo 

Gracias,

Rodrigo

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...