Menu Close
View Categories

Creating Custom Reports

11 min read

Data Crow allows users to add their own reports or to modify the existing reports.
The reports are created with the Jaspersoft Studio software. This software is free for download.

Prerequisites #

  • For creating report the Jaspersoft studio software needs to be installed. Download the software from: https://community.jaspersoft.com/project/jaspersoft-studio. Download the latest version available.
  • You need Data Crow version 4.0.7 or higher.
  • You need to have the Java installed (version 17 or higher). This can be downloaded from the Oracle site: https://www.oracle.com/java/. This is also a requirement for running Data Crow.

The Report Process
#

Report Templates

Data Crow uses compiled reports from Jaspersoft (.jasper file). These are placed in the reports folder of the Data Crow installation folder.
When the software is upgraded the user will be asked whether he/she wants copy the reports over to the reports folder of the installation to the user folder. When you want to test your created or modified reports, copy them to the reports folder of the user folder.

Each time the report dialog is opened, Data Crow scans the reports folder of the user folder for existing .jasper reports files. As Data Crow consists of multiple modules, the reports need to be placed in the reports folder of the module. The folder structure for reports for a particular module is as
follows: <user folder>/Reports/<module name

Example for Microsoft Windows:

D:\Data Crow\Data\Reports\Software

D:\Data Crow\Data\Reports\Movie

Example for Linux:

/Home/Data Crow Data/Reports/Software

Note: it might be the case that your user folder also holds sub directories called PDF and HTML. These are leftovers from older Data Crow versions. These are no longer in use and can be safely removed. The same goes for the files contained within.

Report Creation

When you run a report from Data Crow (Tools > Create Report) Data Crow does three things:

  • Data Crow creates an XML export of the selected items.
  • Data Crow fills the .jasper report file with the XML data.
  • And as a last step the filled report is saved in the selected target format (RTF, PDF or HTML).

The most important thing to note is that Data Crow uses XML extracts for creating the reports rather than accessing the database directly. We will use the XML in the next chapter to design a new (or modify an existing) report.

Secondly, it is no longer required for the reporting process to export the images. Jaspersoft does this automatically in case needed, such as is the case for the HTML reports.

Creating a New Report #

Let’s design a new report! We’ll need a XML file holding Data Crow items (as a source) to create and design a report in Jaspersoft.

Create an XML export

First, we need to have an example XML file so we can use this to design our report.

  1. Start Data Crow
  2. Select the module for which you want to create a report
  3. Select one or more items in the overview, right-click and select Item Export Wizard:
  4. Select XML export and press Next
  5. Select the target file and press Next

    Leave the images option at the default
  6. Leave all fields selected and press Next
  7. The XML will now be created and stored to disk.

Note that we will only use this XML as an example for creating our new report. Data Crow will create the XML extract automatically when you run the report from within Data Crow (Tools > Create Report). It’s important that you selected items which hold the most information as well as a couple of items with very limited information. This is always good for testing the report.

JasperSoft Studio #

Next, start Jaspersoft Studio. On a first start you will be asked to select a workspace location. Pick any location that you want. Once started close out of any of the welcome screens until you are in the actual work area.

First thing we need to do is to set up the XML file we exported as a Data Adapter. Data adapters are used to fill reports with data. Select the Repository Explorer tab and right-click on the Data Adapters. From the right-click menu, select Create Data Adapter.


Select XML Document;

Press Next to further configure the XML data adapter