Jump to content

Virtualization with subreports


shyam_100

Recommended Posts

Hello All,

Please clarify that Jasper virtualizer is applicable only for a single report  or can it be applied on report having mutilple subreports?

I tried generating a text report with a single Jrxml having huge data using JRSwapFileVirtualizer with below configuration.

JRConcurrentSwapFile jRSwapFile = new JRConcurrentSwapFile("D://VirtualizerSpace", 4096, 4096);
virtualizer = new JRSwapFileVirtualizer(3, jRSwapFile, false);

parameters.put(JRParameter.REPORT_VIRTUALIZER, virtualizer);
parameters.put(JRParameter.IS_IGNORE_PAGINATION, false);

JasperReport jasperReport = (JasperReport) JRLoader.loadObjectFromLocation(jasperFile, this.getClass().getClassLoader());
JasperPrint jasperPrint =JasperFillManager.fillReport(jasperReport, parameters, dataBase);
virtualizer.setReadOnly(true);

It generated a huge swap file in the filesystem and generated the text report also successfully. As we analyzed the heap memory using visualgc tool, the memory consumtion was very Low.

But with addition of a subreport the Heap Memory usage started increasing and later fully flooded the heap and resulted in heap space error.

Is Jasper Virtualizer should be used for only a single report (single Jrxml) ? or in the above configuration some thing is  missing.

Please clarify.

Thanks in Advance
shyam

Link to comment
Share on other sites

  • 2 months later...
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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