Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Other Open Source Projects and the fly likes JASPER export to pdf using Servlet Detail not show..help please Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "JASPER export to pdf using Servlet Detail not show..help please" Watch "JASPER export to pdf using Servlet Detail not show..help please" New topic
Author

JASPER export to pdf using Servlet Detail not show..help please

Harrison Budiman
Greenhorn

Joined: May 24, 2010
Posts: 4
Dear all,

First time i want to say hi to everyone here...iam newbie...I hope somebody can help me to find the problem. I'am trying to export Jasper from JSP using Servlet....I got all working...they show the PDF...but the problem why the details section not appear? even i just put static text? i'am also put field there...and i'am already put the dataset from the servlet also...looks like the band was supress...i'am trying on ireport designer to make higher the band and put the box there..but still not show? anyone can help me? i'am already 3 days to find this solution..i'am attaching part of the code and also my screenshot...thank you very much before!

i'am using :

- Net bean 6.8

iam attaching the code and screen shot :







best regards,

Harrison
Hongli Li
Ranch Hand

Joined: Oct 29, 2006
Posts: 124
do you have the the value for variables in the details band? if no, the band might not be displayed.


Do you know why this cup is useful? Because it is empty.
Harrison Budiman
Greenhorn

Joined: May 24, 2010
Posts: 4
Yes i have...this is very weird....the variable is from the resultset / SQL the field called "NAMA" you can see on screenshot that i'am attaching the field Nama....hmm...is it might be of program crash of something? thank you!
Harrison Budiman
Greenhorn

Joined: May 24, 2010
Posts: 4
Hey Li,

I think my problem solved after almost 4 days...hmmm the porblem is the library...i'am using and old library for jasper..i'am update it...i'am copy all library from the new jasper version 3.7.2 and it worked...the old i'am using 3.1.2....don't know which lib..but it already worked...thank you Li!

Harrison
Hongli Li
Ranch Hand

Joined: Oct 29, 2006
Posts: 124
glad you solved it, for non classic version of iReport, the version number iReport is the same as the version of jasperReport. I forgot to mention that.
Harrison Budiman
Greenhorn

Joined: May 24, 2010
Posts: 4
Oh..thank you! so if i'am using jasper 3.7.2 i should using ireport with same version too? thank you before...now i got problem with grouping..but i think it's SQL problem..thank you before...
Hongli Li
Ranch Hand

Joined: Oct 29, 2006
Posts: 124
Harrison Budiman wrote:Oh..thank you! so if i'am using jasper 3.7.2 i should using ireport with same version too?

yes.
guntur reddy
Greenhorn

Joined: Jan 23, 2011
Posts: 9
Hi
I am using jasper 4.0.0 i should using ireport with same version.
but i have a Nullpoint Exceprtion occure


java.lang.NullPointerException
at java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2264)
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2277)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2748)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:780)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:280)
at net.sf.jasperreports.engine.util.ContextClassLoaderObjectInputStream.<init>(ContextClassLoaderObjectInputStream.java:53)
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:200)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:603)
at net.sf.jasperreports.engine.JasperRunManager.runReportToPdfStream(JasperRunManager.java:370)
at com.abhinow.st3.web.servlets.Reportpdf.doGet(Reportpdf.java:65)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129)
at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:102)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:394)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:166)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)


InputStream reportStream = getServletConfig().getServletContext().getResourceAsStream("C:\\workspace\\gvr\\WebContent\\jasper\\examplereport.jasper");
The null point occur in reportStream.
This is write way are not to take a path "C:\\workspace\\gvr\\WebContent\\jasper\\examplereport.jasper"
suppose i am taken a path ("...//jasper//examplereport.jasper") it has a error occur file not found exception.

One thing where the place the Jasper file.I place the .jasper in WebContent\\jasper\\examplereport.jasper


Thanks
Gvr
 
 
subject: JASPER export to pdf using Servlet Detail not show..help please
 
Similar Threads
[RESOLVED] jasper & iReport multi-reports
Error:getOutputStream() has already been called for this response
Jasper Report - PDF not get filled
Problem with jasper reports
Printing using ireport 3.7.4 and jsp