Prev  Up  Next

Using with iReport designer

This package can be used with iReports report designer, following is a description of how to do so.

Defining RecordDataSourceProvider

The class RecordDataSourceProvider implements JRDataSourceProvider ands acts as the interface between iReports and the RecordDataSource (file based data source for a report).


Using RecordDataSource in a Report

First you need to create a report, then

  1. Take menu option Datasource ~ Report query then select the Use DataSource Provider Tab pane

  2. Press the Get fields from datasource to get the RecordEditor layout selection screen

    Follow is the description of the fields on the screen:




    The Record Layouts can be grouped into different systems. This Combo Box is used to select a specific System.

    Record Layout

    The Record Layout used to format the file. Only layouts belonging to the selected System (above) are displayed.

    Note: A Record Layout describes the format of a file, each layout consists of either

    • A series of fields.
    • A serious of record (which intern consist of a series of fields).

    Define fields as numeric

    If this check box is ticked, fields defined as numeric in the RecordEditor DB will be defined as numeric in the Report (otherwise they are defined as String which is faster). If performance is an issue, unselect this option and define only those fields that need to be numeric as numeric.

    Report Record

    When a file consists of more than one record, you would use this combo box to select which record should be used in the report.

    i.e. If file consists of

    • PO record
      • Product record 1
        • Store Record 1
        • Store Record 2
        • ...
        • Store Record n
      • Product record 2
        • Store Record 1
        • ...
        • Store Record n
      • etc
    • PO record 2
      • Product record's

    You could choose Store if this is a store level report.

    Note: The last record of every record type is available via [record name].[Field Name]


    In this List box you select the records that contain fields you want to use in the report. Only fields from the selected Records will be returned to iReports.

  3. Press the go button to get the field selection screen

  4. Select the fields you want and press ok.

  5. Next if you click on the Objects library and then double click on Fields you should see the fields you selected.

  6. Finally you can click on a field and drag it to the report

Designing a file based in iReports:

Running a Report in iReports

To run the report:

  1. To run a report click on the run report icon on the far right of the screen:

  2. Enter File name and the select the appropriate Layout and record and press go

Prev  Up  Next