Report

From ADempiere
Revision as of 04:29, 23 September 2010 by MJMcKay (Talk) (Intermediate save - more to follow.)

Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.

Table of Contents{{#if: Functionality| | Functionality }}{{#if: | | [[{{{3}}}]] }}{{#if: | | [[{{{4}}}]] }}{{#if: | | [[{{{5}}}]] }} | Report{{#if: Request| | Request }} ⇒

The Report function provides a way to generate simple reports based on the data being viewed.

Access

Icon: Report24.png
Menu: →Report }}{{#if: | → }}{{#if: | → }}
Short Cut: <F11>

Restrictions

To enable reports, the user's role must have Can Report checked in the {{#if: |{{{2}}}|Role }} Window.

To Export the reports, the user's role must have Can Export checked in the {{#if: |{{{2}}}|Role }} Window.

The Report function is only available when viewing a data window.

Description

The Report function will display reports on the current records and table. The format of the report is determined by Print Formats, several of which can be defined for any table.

It is possible to modify the report formats and add others so that there is a choice of what you want to see when you click the report button. For more information on the possibilities, see Print Formats.

It is also possible to override the internal report mechanism and create the reports with Jasper Reports. See Jasper Reports Integration for more information.

When the report menu or icon (Report24.png) is selected or clicked, ADempiere will check to see if there are any predefined reports.

If there are no pre-defined reports, ADempiere will create one using the name of the table. This default print format will use a standard header and will display all available fields in a flat format, one line per row. This will often result in a report that is many pages wide - not very useful, but its a start.

If only one report is defined, it will be displayed immediately. If there are more than one, a small pop-up dialog will appear next to the Report icon in the tool bar, as shown below, with a list of all the defined reports. Clicking on one of the items in the list will open the selected report.

 

Report Popup.png

 

ADempiere will determine if the report is a Jasper Report or a standard report and will display the report accordingly. For more on Jasper Reports, see the Jasper Report documentation. The rest of this article refers to the standard report.

The Report Viewer

The Report Viewer appears as shown below.

 

ReportExample.png

 

The Viewer has the following main components:

  • a title bar
  • a main menu (File, View, Go, ...)
  • a tool bar with several controls
  • the report window
  • a status bar at the bottom and
  • a page count

The title bar and main menu are pretty standard with the following additions:

  • File
    • Customize Report
    • Translate
    • Lookup Record
  • Go
    • First Page
    • Previous Page
    • Next Page
    • Last Page

The tool bar contains the following controls:

  • Previous Page
  • Go To Page
  • Next Page
  • Zoom
  • Drill (by table)
  • Print Formats
  • Summary check box
  • Customize Report
  • Lookup Record
  • Print
  • Page Setup
  • Send mail
  • Archive documents
  • Export
  • Exit the Window

We will look at a few of these in detail.

Drilling Up, Down and Across

The Report Viewer provides the ability to drill down into details, across to related reports and up to more general information.

Each _ID field in the report will appear as a link to the default report for the associated table. Double-clicking the link will open that report.

The Drill Control is a combo box style control with a list of tables that use the main key field of the report being viewed. For example, if viewing the Business Partner report, the key field will be C_BPartner_ID. The Drill Control will contain a list of all tables that include C_BPartner_ID as a column.

Selecting any entry in the Drill control will enable the drill. Then, double clicking on any record in the current report will open the report based on that record. You can click anywhere in the record.

As an example, open the {{#if: Product Category|Product Category|ProductCategory }} Window and click on the Report icon (Report24.png). When the report opens, use the Lookup control (see below) to find all records. Then, select Product in the Drill control and double click on any row in the Product Category report. Another Report Viewer will open showing the Product report listing all products in the Product Category you clicked on.

Click on the link to the Unit of Measure (UOM) for any product on the list. A report based on the C_UOM table with the selected C_UOM_ID will appear. Use the Drill control to find all products that use that UOM by selecting Product in the Drill control and then double clicking anywhere on the record in the UOM report.

Try this: find an invoice that has a particular product on one or more of it's invoice lines.

Note.gif Note:

The database is built on one-to-many relationships. The Drill moves along these relationships. This makes it difficult to find ALL invoices that order a particular product but easy to find one invoice that does.

Print Format

The Print Format combo box displays the current Print Format being displayed. If additional Print Formats are defined for the same table, they will also be listed here. Selecting on of them will close the current report and display the selected one.

Note.gif Note:

Defining multiple Print Formats for a table is a great way to display information with less clutter. Set up reports around relevant groupings.

Summary

The Summary check box will collapse the report to its main groupings, showing only columns that are set to "group by" or have one of the "Calculate" functions selected in the {{#if: Format Item|Format Item|FormatItem }} Tab of the {{#if: Print Format|Print Format|PrintFormat }} Window.

Customizing the Report

Clicking on the Customize Report icon (Icon Preference24.png) or selecting File{{#if: Customize Report | →Customize Report }}{{#if: | → }}{{#if: | → }} will open the {{#if: Print Format|Print Format|PrintFormat }} Window. Here the format of the report can be modified, the number and placement of the fields controlled, sort orders set and so on. For more information on how to customize the reports, see Print Formats.

Lookup Record

When the report opens initially, only the current record selected in the window is shown. The Lookup Record function (Icon Find24.png) can be used to find all or specific records. The Lookup Record function works in the same way as it does in the windows. See Lookup for more information.

Page Setup

Send Mail

Archive Documents

Export

For Developers

The software that controls this dialog is found in

  • base/src
    • org.compiere.print.ReportEngine.java
  • client/src
    • org.compiere.apps.APanel.java
    • org.compiere.print.AReport.java
    • org.compiere.print.ReportCtl.java
    • org.compiere.print.ReportViewerProvider.java
    • org.compiere.print.SwingViewerProvider.java
    • org.compiere.print.Viewer.java