Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger
  • Frits Walraven

Jasper subreport not getting displayed when Jasper print is called twice

Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will post this in the jasper forum but since I am having issues in the java code, I thought somebody could help me if I am doing anything stupid in my java code.

Here is the issue. I have 2 jasper reports almost identical except one is used to generate pdf file and another one just old plain text file. I have a subreport in the summary band of the main report page. The code is below.

The problem is when I generate the text file, the subreport data does not come up if I generate the pdf file first.
If I comment out //JasperPrint jPrint = Utils.buildJasperPrint(reportParams, inFile,a); for the pdf then it generates the sub report for the text file.
What am I doing wrong?
Screaming fools! It's nothing more than a tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book
    Bookmark Topic Watch Topic
  • New Topic