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

Help please! Error printing report exception.


2004 IR Help

Recommended Posts

By: siranuchit - siranuchit

Help please! Error printing report exception.

2005-03-31 21:06

I try to print pdf report directly to printer but there is exception : Error printing report.

My code :

<%@ include file="jsp_connect_db.jsp" %>

 

<%

//==============================================

//Report Exporting

//==============================================

File reportFile = new File(application.getRealPath("rno0700.jasper"));

 

Map parameters = new HashMap();

parameters.put("pcourt_running", request.getParameter("pcourt_running"));

parameters.put("ppost_running", request.getParameter("ppost_running"));

parameters.put("ppost_seq", request.getParameter("ppost_seq"));

parameters.put("pnotice_date", request.getParameter("pnotice_date"));

parameters.put("BaseDir", reportFile.getParentFile().getPath());

 

JasperPrint jasperPrint = new JasperFillManager().fillReport(reportFile.getPath(),parameters,conn);

JasperPrintManager.printReport(jasperPrint, true);

 

//==============================================

//==============================================

%>

 

with exception :

type Exception report

 

message

 

description The server encountered an internal error () that prevented it from fulfilling this request.

 

exception

 

javax.servlet.ServletException: Error printing report.

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)

org.apache.jsp.test_005ftom_jsp._jspService(test_005ftom_jsp.java:139)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

 

 

root cause

 

net.sf.jasperreports.engine.JRException: Error printing report.

net.sf.jasperreports.engine.print.JRPrinterAWT.printPages(JRPrinterAWT.java:237)

net.sf.jasperreports.engine.print.JRPrinterAWT.printPages(JRPrinterAWT.java:131)

net.sf.jasperreports.engine.JasperPrintManager.printPages(JasperPrintManager.java:392)

net.sf.jasperreports.engine.JasperPrintManager.printReport(JasperPrintManager.java:283)

org.apache.jsp.test_005ftom_jsp._jspService(test_005ftom_jsp.java:118)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

 

 

note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.

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...