The JasperReports Ultimate Guide
Page 44
8 Report Elements
The generated reports would be empty if you would not put some report elements in the report design.
The report elements are displayable objects like static texts, text fields, images, lines or rectangles, that
you put in your report design sections so that they appear in the final document.
As you can see, the report elements come in two flavors:
_ Text elements: static texts and text fields that display dynamic content;
_ Graphic elements: lines, rectangles and images.
We shall see those two element categories and their particularities in the following sections. For now
we are going to present in detail the element properties that both categories share.
When you add a report element to one of your report sections, you have to specify the relative position
of this element in that particular section and its size, along with other general report element properties
like color, transparency, stretch behavior, etc.
The properties that are common to all types of report elements are grouped in the <reportElement>
tag that can appear in the declaration of all report elements.
XML Syntax
<!ELEMENT reportElement (printWhenExpression?)>
<!ATTLIST reportElement
positionType (Float | FixRelativeToTop | FixRelativeToBottom)
"FixRelativeToTop"
isPrintRepeatedValues (true | false) "true"
mode (Opaque | Transparent) #IMPLIED
x NMTOKEN #REQUIRED
y NMTOKEN #REQUIRED
width NMTOKEN #REQUIRED
height NMTOKEN #REQUIRED
本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/ruanjian/article-30468-30.html
更新了之后
天天骂