Usage of Virtualizers in JasperServer/Studio

Posted on by By Satya Gopi, in Jaspersoft | 0

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

3 types of Virtualize

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 /jasperserver-pro/WEB-INF directory

Default one is File Vitualizer, we need to change the filevirtualizerfactory bean for other Virtualizer.

File Vitualizer

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:

  1. maxSize: This is the pages that we need to exclude, once it is exceeded then Virtualizer came to picture, Default is 300
  2. 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

Setup Jasper Studio

In case if you have any queries please get us at support@helicaltech.com

Thanks,
SatyaGopi.
BI Developer.
Helical IT Solutions Pvt Ltd

logo

Best Open Source Business Intelligence Software Helical Insight Here

logo

A Business Intelligence Framework


logo

Best Open Source Business Intelligence Software Helical Insight is Here

logo

A Business Intelligence Framework

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments