• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

my jasper report viewer is generating blank pdf output

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I have created a jasper report using jasperstudio 7.0. Report is woking fine inside the jasperstudio. But when call this jasper report from my java servlet, i am getting blank pdf ouput. jasperviewer shows "failed to load PDF document". when i export the PDF file, it is zero KB file. Below is my code with viewer and request your support to address my issue.

JasperReport jReport = (JasperReport) JRLoader.loadObjectFromFile("d:\\reports\\test.jasper");
JasperPrint jPrint = JasperFillManager.fillReport(jReport, null, myConnection);
JasperViewer.viewReport(jPrint,false);

I have below jar files in lib folder
commons-beanutils-1.9.4.jar
commons-codec.jar
commons-collections4-4.5.0.jar
commons-digester-2.1.jar
commons-logging-1.1.2.jar
jasperreports-7.0.0.jar
jasperreports-data-adapters-7.0.0.jar
jasperreports-groovy-7.0.0.jar
jasperreports-pdf-7.0.0.jar

I am using JDK-21.
jasper-error.png
[Thumbnail for jasper-error.png]
 
Ranch Hand
Posts: 342
1
Mac Eclipse IDE Safari
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just a wild guess bit could the account which its running on need a default print queue ?
 
ys reddy
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
nothing (i feel) with print queue as jasper generates PDF output and shows on browser. any other clue to understand the problem. I suspect the problem with jar (v 7.0.0) files placed in the lib folder vs JDK (21) I have. But the same jasper file is running well inside jasper studio.
 
Blood pressure normal? What do I change to get "magnificent"? Maybe this tiny ad?
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic