(Working Copy) Report Setup and Jasper Custom Reports

Report Setup and Jasper Custom Reports

Getting Started with Jasper Reports

An old video introduction may be helpful if you have never worked with Jasper iReport or Jasper Studio before. Jasper Reports with VetView (2015)  Although Jasper iReport has changed, the basic terms and layout are still the same in the current version.  A PDF version of this is also available at Building Custom Reports with iReport. 

Download the most recent version of Jasper iReport Designer or Jasper Studio

First, ensure that Java 8 or 11 has been installed on the computer you are using, before attempting to download and install iReport or Studio.

As of November 2021, the last supported version of iReport is 5.6 and may be downloaded for free from Sourceforge:  https://sourceforge.net/projects/ireport/files/latest/download

However, VetView has found that version 5.1 of iReport has all the features needed and may be easier to use, and does not have some compatibility issues the same way 5.6 does. 

Jasper Studio Community Edition may be downloaded from:  https://sourceforge.net/projects/jasperstudio/  The latest supported version for VetView is Studio 6.12.2.  Although the layout is slightly different from iReport, you should still be able to follow along with the tutorial video linked above. 

Connect to your installation of VetView

No matter which version of iReport or Studio you use, you will need to connect to your installation of VetView using a Database JDBC Connection.

Contact your hospital or IT department's database administrator to find the exact credentials and URL you will need to use to make this connection.

Once your database connection is set, you can begin creating a new report, or modifying an existing VetView system report.

You may need to install the Oracle driver on your local system in order for the connection to launch.   Contact VetView if you have trouble finding or downloading this driver.

Types of Reports

SQL Reports are the most common and flexible type of reports.  Any Oracle/PostGres SQL query should be able to get the data for these reports.

JavaBean Reports use pre-formatted data from VetView.  They are easier to use, but not as flexible as raw SQL reports.

Most VetView system reports use Javabeans. 

Modifying VetView System Reports

If you want to make some simple changes to a report that shipped with VetView, you can download the JRMXL and Jasper files, and then re-upload them as a custom default version.

On the Report Setup screen, open the report you want to modify, and click on the Download buttons to save the files to your local machine.

The JRXML file is the editable version of the report that you load and modify in Jasper Studio or iReport.  The Jasper file is the compiled version of the report that VetView can run.  We recommended that both be uploaded and downloaded together, so that if any changes are made, they are made to both files equally.  (Otherwise the versioning of your reports may become incorrect.)

Jaspersoft Layout

Open the JRXML file that you want to modify. 

In the example below, the system Patient Label has been opened in Jasper Studio.

The key panels visible are the Repository Explorer which contains the data adapter to connect you to the VetView server, the Outline of the report that has all the configurable parameters, fields, and contents of the Details row, and the Main Report panel which displays the actual layout. 

Dataset and Query

SQL reports have a query in the background.  (If there are errors in the query, the report cannot run.)

Right click the name of the report and choose Dataset and Query.

This is where you can create the SQL query, verify the data that the report will pull, and define the parameters that the report can use.  These parameters are then matched into VetView under Report Setup.

  • VetView tables appear on the upper left pane
  • Write the SQL query on the upper right pane
  • Define the parameters in the lower pane


Add Parameter in Jasper

In the context of Jasper reports used in VetView, a Parameter is an additional condition that you want to select at the time the report is run, rather than hard baking it into the report.  This allows you to set start dates and end dates, to run the query against specific products or line items, or specific employees, clients, or units.  

Click on the Add button on the Query and Dataset window to create a new parameter to be used in the query.

View existing Parameters in Jaspersoft iReport or Studio

A list of the parameters associated with the report are visible in the left panel under the Outline window in your Jasper workspace.

On this tree, additional parameters can also be configured in Jasper by selecting Parameters > New or Create Parameter depending on your version.

Please see our iReport tutorials for more information about how to create parameters in the local report from scratch.  Note that only the parameters included in the Local Reports Parameters in VetView are supported. 

VetView Wiki

Most recent releases of VetView:  Version 4.1.3 Hotfix (Released 2/16/2024)

To see commonly used terms in VetView Hospital, please visit our Hospital Glossary of Terms.

Contents