Birt Report Tutorial Java



Home > Articles

  • The basic idea for working with BIRT in EGL is as follows: You create an EGL BIRT report, which is a variable based on BIRTReport, an external type.You can include various details (name of a design file, for example) when declaring that variable, or you can avoid specifying some or all of the details and add them later by invoking functions or setting fields that are specific to the EGL BIRT.
  • This brief tutorial walks you through building a simple report with BIRT. It introduces the major UI features, and many of the BIRT reporting elements. At the completion of this tutorial, you should be able to start building your own reports using your own database.
  • Install the report engine in your Java EE application server to run BIRT reports over the web. A preview engine is included with the Report Designer download. Report Engine OSGi deployment If you wish to deploy the BIRT runtime as an OSGi runtime, use this download.

BIRT 2.6 Data Analysis and Reporting. BIRT is an open source business intelligence and reporting tool, built on top of the Eclipse Framework.BIRT is used by developers for building reports that can best represent data and tell a story of that data that is easy to follow.

TutorialBirt Report Tutorial Java
  1. About report files and supported formats
< BackPage 5 of 6Next >
This chapter is from the book

Birt Report Tutorial Java Jdk

BIRT: A Field Guide, 3rd Edition

This chapter is from the book

This chapter is from the book

About report files and supported formats

In the tutorial, you created and formatted a report using graphical tools. This section describes the document model that BIRT Report Designer uses and how you can view the code behind the report. This section also describes how to save and preview a report in formats other than HTML.

Report design files

BIRT Report Designer uses a simple document model. When you create and save a report design, BIRT Report Designer creates just one file with the .rptdesign file-name extension. This file contains all the information that is necessary for generating a report.

Unlike many report design tools that generate files in proprietary formats, BIRT design files are written in XML. XML is a widely used markup language specification that was designed especially for web documents. Because BIRT uses XML to define the structure and contents of a report design, developers can leverage their knowledge of XML to get a deeper understanding of how BIRT constructs a report design. BIRT's suite of report-specific XML elements and properties is called Report Object Model (ROM).

You open a report design (.rptdesign) file with the report editor, which, by default, displays the report design in the layout editor. The layout editor provides a graphical view of the report design. If you wish, you can view the report design in the XML editor. This editor displays the XML that BIRT Report Designer generates when you create a report.

View the report design in the XML editor to see its XML code or to locate, by line number, an error that was reported in the Problems view. To understand the XML code, you can consult the ROM specification at the following location:

How to open a report design

Birt Report Tutorial Java Tutorial

  • If using BIRT Report Designer, use one of the following methods:

    • In Navigator, double-click the .rptdesign file.
    • Choose File Open File, then select the .rptdesign file from the file system.

    If someone sends you a .rptdesign file, first save the file in a project folder, then, in Navigator, right-click the project, and choose Refresh. This action updates the project folder to include the file, which you then open using one of these two methods.

  • If using BIRT RCP Report Designer, choose File Open File, then select the .rptdesign file from the file system.

Eclipse saves your environment settings when you exit. If you keep a file open when you exit Eclipse, this file opens when you next start Eclipse.

How to view a report design in the XML editor

  1. Open the report design file, using one of the procedures that is described in the previous section.

    The layout editor displays the graphical view of the report, as shown in Figure 3-39.

    Figure 3-39 Report design in the layout editor

  2. Choose the XML Source tab at the bottom of the report editor.

    The XML editor displays the XML that defines the report design, as shown in Figure 3-40.

Report output formats

You can save and view a report in the following formats:

  • HTML
  • Microsoft Excel document (.xls)
  • Microsoft PowerPoint document (.ppt)
  • Microsoft Word document (.doc)
  • PDF
  • Postscript

In addition, users who receive reports can export the data to any of these common office software formats, then edit and redistribute the reports to other users.

Previewing a report

As you work on the design of a report, you typically want to see the report as it would appear to the report user. Using BIRT, you can easily preview a report in any of the supported output formats. You can also view the report in the BIRT report viewer. The report viewer, shown in Figure 3-41, is an interactive viewer that provides report users with the capability to jump to specific pages or to specific sections of a report, to run a report to get the latest data, to print a report, and to export a report to any of the supported output formats.

Figure 3-41 BIRT Report Viewer

The following list describes the ways to preview a report:

  • To preview a report in BIRT Report Designer, choose the Preview tab at the bottom of the layout editor. The previewer displays the report in HTML format.
  • To preview a report in the report viewer, choose Run View Report In Web Viewer.
  • To preview a report as a Microsoft Word document, choose Run View Report As DOC.
  • To preview a report in HTML format in a separate window, choose Run View Report As HTML.
  • To preview a report in PDF format, choose Run View Report As PDF.
  • To save a report as a PostScript file, choose Run View Report As POSTSCRIPT.
  • To preview a report as a Microsoft PowerPoint document, choose Run View Report As PPT.
  • To preview a report as a Microsoft Excel document, choose Run View Report As XLS.

Related Resources

  • eBook (Watermarked) $38.39
  • eBook (Watermarked) $38.39
  • Downloadable Video $996.00