• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
do you have the the value for variables in the details band? if no, the band might not be displayed.
 
Harrison Budiman
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Harrison Budiman wrote:Oh..thank you! so if i'am using jasper 3.7.2 i should using ireport with same version too?


yes.
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
reply
    Bookmark Topic Watch Topic
  • New Topic