Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Panel | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Getting Started with Jasper Reports
Download the most recent version of Jasper iReport Designer or Jasper StudioFirst, 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 VetViewNo 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.
Types of ReportsSQL 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 ReportsIf 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 LayoutOpen 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 QuerySQL 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.
Add Parameter in JasperIn 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 StudioA 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. Local Reports Parameters in VetView
For some Local Reports, you can set the Parameters that will be prompted for under the Local Reports screen when the report is selected by defining them in report setup. The Type is the type of parameter that the report will feed from VetView to Jasper. All dates must be of the type Java.util..date. The Label is how it will appear loaded into VetView. The Name is the link between the Jasper report and the VetView database. The name should match what was set in iReport or Jasper Studio when you defined the parameter. The Default Value may be useful for certain reports that usually have one primary variable, but may need another on occasion, Image Removed These parameters built into VetView are: | |||||||||||||||||
Parameter Type | Jasper Field type | Example in Vetview | Example in Jasper | Visual on Local Report | Date Range | Java.util.date | startDate, endDate | a.date_created between $P{startDate} and $P{endDate} | Text | java.lang.String | Diagnosis | use "keyword" as a search query : Where LOWER (cm.description) like '%$P!{keyword}%' to search for the string name | Number | java.lang.Double | minVaue, maxValue | Where c2.client_total between nvl($P{minValue},0) and nvl($P{maxValue},999999999) | String List | java.util.List | Date | Java.util.date | Fiscal Quarter | Fiscal Year | Adjustment Types | java.lang.String | $P{ADJUSTMENT_TYPE} | Adjustment Types List | Value List | java.util.List | request questions | Employee | Java.util.String | employee | where e.emp_id = $P{empID} | Employee List | java.util.List | Unit | java.lang.Long | unitID | where oi.service_unit_id = $P{unitID} | Unit List | Inventory Location | java.lang.String | location_name | Inventory Location List | Catalog Item | Catalog Item List | Product | Product List | Product Line | java.lang.Long | product_line | Where l.product_line = $P{product_line} | Product Line List | Product Seq | java.lang.Long | seq | And m.product_seq_id = $P{seq} | Client | Client Type | java.lang.String | clientType | AND lower(t.client_type) = nvl(lower($P{clientType}),lower(t.client_type)) | Client List | Result | Result List |
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Info |
---|
To see commonly used terms in VetView Hospital, please visit our Hospital Glossary of Terms. |
Panel | ||
---|---|---|
| ||
|