Use of Birt labels

Source: Internet
Author: User

 

Because no tags are used, you can directly access reports using URLs. But some people have been asking about how to use tags.
The tag definition of Birt is probably the content in the TLD file. Let me translate it.
Birt labels are divided into four tabs: View, report, Param, parameterpage, and paramdef.
The following is a simple description of these five labels.
I. View labels
Example:
<Birt: viewer id = "1"
Pattern = "run"
Reportdesign = "test1.rptdesign"
Position = "absolute"
Width = "800"
Height = "500"
Left = "50"
Top = "50"
Format = "html"
SVG = "false">
<Birt: Param name = "sample" value = "ABC"/>
<Birt: Param name = "Cust" value = "<%= 110%>"/>
</Birt: viewer>

ID: required,
Pattern: Specify the Servlet used for running. The default value is frameset.
Reportdesign: Specify the report file name
Title: (optional) Title of the report. This is not the title of the report design, but the title displayed on the report during report running.
Ishostpage: Optional. The default value is false, indicating whether the report is displayed in full screen. If this attribute is set, the width, height, and scrolling attributes are invalid.
Scrolling: (optional) Whether to display a scroll bar.
Position: (optional) Position of the report relative to the page. The value is static | absolute | fixed | relative. If ishostpage is set, this attribute is voided.
Style: Optional. The style displayed in the report ., If ishostpage is set, this attribute is voided.
Width, heigth, top, left: Specify the width, height, top margin, and left margin of the report.
Frameborder: (optional) Whether to display the border of the IFRAME in which the report is located. It is not displayed by default. The value is Yes/No.
ReportDocument: (optional) report document. Only file: URL is supported.
Reportlet: (optional) This attribute can be specified using reportdocument, but the ID of the reportlet instance is specified. This attribute is not supported by another frameset.
Bookmark: (optional) name of the target bookmarks.
Locale: Specifies the locale information and the language environment.
SVG: (optional) whether to support output of SVG documents.
Format: Optional. Specify the report output format.
Pageoverflow: Optional. When the output format is PDF, the page overflow style is specified. 0 indicates automatic, 1 indicates actual size, and 2 indicates suitable page size.
Pagenum: (optional) Whether to display the page number.
Pagerange: Specifies the page range. Specify this attribute when running the document file.
Resourcefolder: Specifies related resource files. By default, the resource folders defined in Web. XML are identified.
Showtitle: whether to display the report title. The default value is true.
Showtoolbar: whether to display the toolbar. The default value is true.
Shownavigationbar: whether to display the navigation bar. The default value is true. However, if allowpagebreak is set to false, this attribute is voided.
Showparameterpage: whether to display the parameter dialog box. The default value is true,
The view tag is basically the same. There is no difficulty.

Ii. Report label

Similar to the view label, but the report does not support Ajax, but directly displays the content on the page. Preview should be used internally.
Another special property, reportcontainer, has two optional values: IFRAME, and Div. The default value is IFRAME. The container that uses the report is specified.
Other attributes are similar to the view, so I will not talk about them. Example:

<Birt: Report id = "2"
Reportdesign = "test. rptdesign"
Position = "absolute"
Width = "400"
Height = "300"
Left = "900"
Top = "100"
Format = "pdf"
Reportcontainer = "iframe">
<Birt: Param name = "sample" value = "ABC"/>
</Birt: Report>

Iii. Param
Tags related to report parameters.
Name: Specify the report parameter name.
Value; parameter value
Pattern: parameter format
Displaytext: display text
Islocale: Specifies whether the parameter is a localized character.

Iv. parameterpage
Configuration parameters page.
ID: required. ID of the parameter page
Name: Specifies the parameter Page name. If iscustom is set to true, this attribute must be written and unique.
Iscustom: Specifies whether to use the custom parameters page. The default value is false;
Target: Specifies the location where the request opens the window.
Other attributes are similar to views.
Here is an example:
<Birt: parameterpage id = "parameterpage"
Pattern = "run"
Reportdesign = "test. rptdesign"
Target = "myiframe"
Width = "600"
Height = "400"
Format = "html"/>

<IFRAME name = "myiframe" width = "600" Height = "400"> </iframe>

V. paramdef
This tag is used to generate the HTML code of the parameter defined on the parameter parameters page.
Has the following attributes:
ID, name, value, pattern, displaytext, islocale, title, style, cssclass.
In this case, you may not understand,
Let's give an example to understand what's going on.

<Birt: parameterpage
Id = "report2"
Name = "page2"
Reportdesign = "test. rptdesign"
Iscustom = "true" // specify the custom page
Pattern = "frameset">
ID: <Birt: paramdef id = "ID" name = "ID" Title = "this is the region where the ID is set"/>
<Br>

Sex: <Birt: paramdef id = "sex" name = "sex"/>
<Br>
<Input type = "Submit" name = "Submit" value = "sumbit form"/>
<Br>
</Birt: parameterpage>

Assume that your text report contains two parameters, one parameter is ID and the other parameter is sex. In this case, assume that ID is a column value and sex is checkbox.
The parameter page displays the value of this ID and the checkbox of sex.
Try it on your own and you will understand the truth.

Let's talk about this. We should practice it on our own.

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.