Deploy a Birt report to your application server from the eclipse Chinese Community)

Source: Internet
Author: User

Recently, I used Birt as a report generation tool in my project. I saw many friends on the forum having problems during deployment. Hope this articleArticleIt is helpful to you. It is based on the developer documentation translation of birt1.0.1. 2.0 has just been released and has not been used yet.

This section describes how to deploy an existing Birt report, that is, the. reptdesign file you have designed. This document does not describe how to design the Birt report.

Deploying a Birt report to an application server

Here, Birt indicates that the current version has not been tested in a environment higher than jre1.4. If you need to release it to the jre1.5 environment, there may be problems. The following uses Tomcat as an example.

1. Placing the Birt report viewer on the Application Server

Copy eclipse_install/plugins/org. eclipse. birt. report. viewer_1.0.1/Birt to your $ tomcat_install/webapps. This Birt is actually a complete web application, and no jar package needs to be added. You can also specify the <Context/> directory in Tomcat to add the file. For more information, see the document.

2. Viewing a report using a browser

After adding the Birt application, start your tomcat, and then you can access Birt through a browser. There are two methods

Http ://LOcalhost: 8080/Birt/run?Parameter_list
Http ://LOcalhost: 8080/Birt/frameset?Parameter_list

2.1 understanding the run Servlet

If run servlet is used, Birt will display a separate web page or a PDF file

2.2 understanding the frameset Servlet

If you use frameset servlet, Birt will display three frames, a form that displays input report parameters, a display report, and a navigation bar.

2.3 understanding the URL parameters

The following table lists the parameters supported by Servlet. Note that the _ frame parameter is only valid for the frame servlet, And the reportparam parameter is the parameter defined in your own report.

Parameter

Values

Required/Default

_ Report

Path to report design File

Yes, no default

_ Format

HTML or PDF

Optional/default to HTML

_ Frame

True or false

Optional/default to true

_ Locale

Locale

Optional/defaults to JVM locale

_ Navigation

Hide or Parameter

Optional/default to auto

_ Toolbar

True or false

Optional/default to true

_ Isnull

Any User-Defined Report parameter values

Optional/No Default Value

Reportparam

User-Defined

As specified in the report design/as specified in the report Design

2.3.1 understanding the _ report Parameter

The _ report parameter can be defined in three ways.

A. absolute path

Http: // localhost: 8080/Birt/run? _ Report = c: \ myreport. rptdesign

Your rptdesin file is stored in c: \ myreport. rptdesign

B. relative path, but birt_viewer_report_root is not defined in your web. xml.

Http: // localhost: 8080/Birt/run? _ Report = Report \ myreport. rptdesign

Your rptdesin file is stored in $ tomcat_installl \ webapps \ Birt \ report \ myreport. rptdesign

C. relative path, but your web. xml defines birt_viewer_report_root as c: \ reports.

Http: // localhost: 8080/Birt/run? _ Report = myreport. rptdesign

Your rptdesin file is stored in c: \ reports \ myreport. rptdesign

Other parameters are simple, so we will not discuss them one by one.

The deployment process is actually very simple. The main problems I encountered are:

1. The path is incorrect.

2. Custom parameters are not defined

3. The _ locale parameter is not added, indicating a problem with Chinese characters.

4. All parameters are preceded by two underscores

Hope to help your project. If you have any questions, please reply

Ko4java

Related Article

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.