Up  Next


Getting Started


Introduction

This package makes it easy to design and run reports from Fixed Width Data files including both Cobol and Mainframe Cobol files.

This package provides

  1. A Jasper JRDataSource for reading Fixed Field Width Data files (both Text and binary) for

  2. A Jasper JRDataSourceProvider to make it easy to define reports in Jasper report designers like iReports.

This document describes using the package with iReports. Following is an example of a Report (for a mainframe Cobol file) in iReports:


Requirements

Jasper

JasperReports or iReports (which includes JasperReports) must be installed. This document assumes iReports is installed.

RecordEditor

RecordEditor must be installed.


Installation

Following are the steps to install the package with iReports. Installing with JasperReports is the same (just different install directory):

  1. Install iReports (if not already installed).

  2. Install RecordEditor If not already installed I would suggest using the following


    Environment Download Version to Use
    Windows & Ms-Access RecordEdit_Installer_for_MSAccess_055.exe
    Windows RecordEdit_Installer_for_HSQL_v055.exe
    Linux RecordEdit_Installer_for_HSQL_055.jar

  3. Unzip the re2Jasper zip file into the RecordEditor install directory.

  4. Copy the following jars from the <RecordEditor install directory>/lib or Jar Directories to <iReports install directory>/lib directory.

    Note: The all the jars in the MS-Access version are in a Jar directory, in all other versions, the jars are in the lib directory.

    Note: Do not copy the LayoutEdit.jar from <RecordEdit install directory>/lib

  5. If you are running the HSQL version of the RecordEditor, Remove hsqldb-1.61.jar from the <iReports>/lib directory. The HSQL version of the RecordEditor uses version 1.7.3 of HSQL which is not compatible with version 1.61 of HSQL that comes with both iReports and JasperReports.


Jasper Interfaces

JRDataSource

Abstract representation of a JasperReports data source (i.e. source of the data to be written to the report). This package contains a class RecordDataSource which implements JRDataSource

JRDataSourceProvider

Abstracts the means of creating and disposing a data source. This interface is meant to be the standard way to plug custom data sources into GUI designers. Typically the report developer will implement this interface to create and return a configured data source of the desired type and then configure the designer to use this implementation.

This package contains a class RecordDataSourceProvider which implements JRDataSourceProvider


Supplied Java Source


Class Purpose
BaseDataSourceProvider Abstract JRDataSourceProvider
CopybookToLayout Class to read a Cobol Copybook into the internal Record-Layout definition.
JasperConst Various directories used. You should Check this class before running any of java examples.
LayoutOptions Options class.
RecordDataSource Most important class in the package. It reads a File and supplies the data in it to JasperReports. It is a JasperReports JRDataSource.
RecordDataSourceProvider Interface to Jasper Reports designers like iReports. It is a JasperReports JRDataSourceProvider.
Zcompile Sample program to compile a jasper report.
ZRunCobolRpt Example of running jasper reports with Report Layouts read from Cobol Copybooks.
ZRunRpt Example of running jasper reports with Report Layouts read from


Supplied Example Reports

Sample data files for these reports are in the <RecordEditor install directory>/SampleFiles


Report Layout Description
amsPO_Chart1.jrxml ams PO Download Chart Report built from a unix Text file
amsPO_Chart2.jrxml ams PO Download Chart Report built from a unix Text file
amsPo_rpt1.jrxml ams PO Download Report built from a unix Text file
amsPo_rpt2.jrxml ams PO Download Report built from a unix Text file
DTAR020_chart1.jrxml DTAR020 Chart Report built from a Mainframe (Z-OS) Binary file
DTAR020_rpt_1.jrxml DTAR020 Report built from a Mainframe (Z-OS) Binary file
DTAR020_rpt_2.jrxml DTAR020 Report built from a Mainframe (Z-OS) Binary file

Sample files:
Layout Sample Files
ams PO Download Ams_PODownload_20041231.txt
Ams_PODownload_20050101.txt
DTAR020 DTAR010_Chart.bin
DTAR020.bin


  Up  Next