Jump to content
JasperReports Library 7.0 is now available ×

Blank pages when using Virtualizer


2004 IR Help

Recommended Posts

By: Robbie Robinson - rrobinson

Blank pages when using Virtualizer

2005-12-16 10:24

I have recently upgraded to Jasper 1.1.1 and implemented JRFileVirtualizer in my application. I also downloaded the newest version of all the 3rd party .jar files that japser uses. The report I am using for testing creates a 44 page pdf file.

 

If I set the JRFileVirtualizer "maxsize" parameter to something small like "2", jasper produces a 44 page pdf with every page being blank, no data any where in the report.

 

If I set the "maxsize" to a larger value (but less than the total number of pages in the report), say "20", I get a 44 page report with random blank pages and some good pages.

 

If I set the "maxsize" to something larger than 44, say "100", then I receive a good 44 page report.

 

So, when the entire report is procssed in memory with no swapping, it is fine. When it starts to swap files to disk, I start getting blank reports. Any suggestions?

 

 

 

 

By: Lucian Chirita - lucianc

RE: Blank pages when using Virtualizer

2005-12-19 00:16

Hi

 

Are you serializing and deserializing the filled JasperPrint object? This is not yet supported when using virtualization, the print object must be kept in memory.

 

Regards,

Lucian

 

 

 

 

By: Robbie Robinson - rrobinson

RE: Blank pages when using Virtualizer

2005-12-21 12:58

I am using JasperExportManager.exportReportToPdfFile(srcfilename, destfilename) to create the pdf file.

 

Any idea when/if virtualization will support serializing the JasperPrint object?

 

Thank for your help,

RRobinson

Link to comment
Share on other sites

  • 1 month later...
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I am using JasperReports 1.1.0 and have the same blank page issue. Do more recent versions of Jasper still have the problem?

 

[

My application has a client-server architecture. Tomcat hosts my report generation servlet, which in turn uses jasper reports to create the jasperprint object (using jrfilevirtualizer). The jasperprint object thus generated is serialized and sent over a http connection to the Swing client which deserializes the jasper print object and displays it.

]

 

Any suggestions will be appreciated.

Link to comment
Share on other sites

Serializing virtualized JasperPrint objects is supported since JR 1.2.0.

 

Note that if you have a virtualized JasperPrint object, serialize it and then deserialize it, it will no longer use the original virtualizer, since this virtualizer might no longer be available. If you want to specify a virtualizer to be used by the deserialized JasperPrint you can do it via JRVirtualizationHelper.setThreadVirtualizer().

 

HTH,

Lucian

Link to comment
Share on other sites

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