Before going to the virtualizers we need to know how a Report is generated in Jasper:
Generally the reports are created using Jasper Studio or Adhoc Reports which creates a jrxml file, once it complies we will going to get the .jasper file, after rendering the data it will create a jasper print object.And this object is exported into different formats (HTML,Excel,PDF,xlsx).
When virtualizers came to picture:
These virtualizers came to picture at the creation of jasper print object. Some times we will get Out of memory exception when this print object has a large number of data.virtualizers will break this print object into different pieces and saved into the hard drive or compress it into zip format, it will generate the report without any exception but the report will generate a little slow.
Types of virtualizers:
There are 3 types of virtualizers
Every virtualizer has its own advantages and disadvantages, choosing the virtualizer will depend on the size of Data
Files Need to Change:
We need to change the applicationContext.xml to configure the virtualizer, It is located in
Default one is File Vitualizer, we need to change the filevirtualizerfactory bean for other Virtualizer.
For Swap file Virtualizer it would be like
com.jaspersoft.jasperserver.api.engine.common.service.impl.SwapFileVirtualizerFactory
For GZIP Virtualizer
com.jaspersoft.jasperserver.api.engine.common.service.impl.GZipVirtualizerFactory
Here We Have 2 Parameters:
- maxSize: This is the pages that we need to exclude, once it is exceeded then Virtualizer came to picture, Default is 300
- Directory: to save the temporary files.
Using virtualizer in Jasper Studio:
To check the virtualizer performace we no need to deploy the report in Jasper Server, from Studio level also we can check the performance.
Setup in Jasper studio(6.6.0):
Open Jasper Stuido –> Window Tab –>Preferences–>JasperStudio–>Report Execution,just enable Use Virtualizer and set the parameters there it self
In case if you have any queries please get us at support@helicaltech.com
Thanks,
SatyaGopi.
BI Developer.
Helical IT Solutions Pvt Ltd
Best Open Source Business Intelligence Software Helical Insight Here
A Business Intelligence Framework
Best Open Source Business Intelligence Software Helical Insight is Here