PentahoReportDesigner getting started tutorial (2)

Source: Internet
Author: User
PentahoReportDesigner beginners tutorial (2) PentahoReportDesigner5.1 is the latest version. I. Installation and introduction: first install jdk, configure java environment variables, download pentahoreport, decompress it, and run it directly. 2. Example 3: integrated display in the Swing Program

PentahoReport Designer quick start tutorial (2) Pentaho Report Designer5.1 is the latest version. I. Installation and introduction: first install jdk, configure java environment variables, download pentaho report, decompress the report, and run it directly. 2. Example 3: integrated display in the Swing Program

PentahoReport Designer getting started tutorial (2)

Pentaho Report Designer5.1 is the latest version.

I. Installation and introduction

This section describes how to install jdk, configure java environment variables, download pentaho report, decompress the report, and run it directly.

Ii. Example 1

3. Integration in Swing programs

The sample program consists of three parts:

1. Create a simple Swing program and display two buttons, preview the report and close the program;

Click the Preview button to bring up the report page.

2. Compile an ant script to automatically compile and run the program (optional)

3. embedded report content and corresponding jar package description

? Initialize the report engine:

ClassicEngineBoot. getInstance (). start ();

? Report resource file loading code:

ResourceManager manager =NewResourceManager ();

Manager. registerDefaults ();

Resource res = manager. createDirectly (NewURL (

"File: data/ch2_1.prpt"), MasterReport.Class);

MasterReport report = (MasterReport) res. getResource ();

? Show report Event code:

Final PreviewDialog preview = newPreviewDialog (report );

Preview. addWindowListener (newWindowAdapter (){

Publicvoid windowClosing (final javaswevent event ){

Preview. setVisible (false );

}

});

Preview. pack ();

Preview. setVisible (true );

? Jar Package Description

Jar File

Description

Libbase. jar

Libdocbundle. jar

Libfonts. jar

Libformat. jar

Libformula. jar

Libloader. jar

Librepository. jar

Libserializer. jar

Libxml. jar

Libswing. jar

Pentaho-reporting-engine-classic-core.jar

Pentaho-reporting-engine-classic-extensions.jar

The jar package corresponding to the report engine. libswing. jar is added to version 5.1. Each jar file name ends with a version. required;

Commons-logging-api.jar

Log usage, required;

Poi-3.9.jar

Poi-ooxml-3.9.jar

Poi-ooxml-schemas-3.9.jar

Xmlbeans-2.5.0.jar

Dom4j-1.6.1.jar

Generate excel-related files; optional;

Itext-2.1.7.jar

Generate pdf; optional;

Itext-rtf-2.1.7.jar

Rtf file; optional;

4. Integration in j2ee

To be continued...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.