ireport notes

本文介绍了iReport报表设计的关键概念和技术细节,包括字体设置、表达式验证、脚本支持、打印顺序配置、图形元素及文本字段操作等。还探讨了如何通过特定快捷键快速转换静态文本为动态字段,并详细解释了不同类型的报表元素及其属性。

1:font
 view->font
变量:逻辑运算
参数:条件
字段:数据库
组是一个很重要的概念,一个报表可以多个组,每个组以一个关键字为标记

expression
 valid
  new Boolean(true); "this is a expression";(($P{MyParam}.equals("s")?"yes":"no");
 invalid:
  3 + 2;true;(($P{MyParam}==1?"yes":"no");
 $F{name_field}
 $V{name_variable}
 $P{name_parameter}
 $P!{name_parameter}
 $R{name_resource}
JREmptyDataSource

A scriptlet is a java class whose methods are executed according to specific events
during report creation, like the beginning of a new page, the end of a group, etc.
it is possible to specify an external scriptlet (a java class) or activate
iReport’s internal scriptlet support

Print order
 The Print order determines how the print data is organized on the page when using multiple columns.

graphic elements
 chart,barcode,line, rectangle, ellipse, image)
text fields
 labels and textfield
it could be useful to disable the elements dragging through the mouse by selecting the menu Edit→Disable elements mouse move
 CTRL+M;/options;

Edit->insert page/column separator

Element properties
 Remove Line When Blank\
 Print in first whole band
IMAGE:
 type:File
 value:new java.io.File("")
  has no ";"

Import lib
 edit - > report import ...

Evaluation time
 it defines in which creation phase the Image Expression has to be processed;

Border color:
 click the rectangle in border tab;

It is possible to transform a StaticText in a Textfield by selecting it and pressing the F3 key.
In order to change quickly the expression of one or more generic text elements, select them and press F2.

subreport

 

 

ch06 font
Usually a font is defined by four basic characteristics:
- Font name (font family)
- Font dimension
- Attributes (bold-faced, italics, underlined, barred)
PDF Font Name: This is the name of a predefined PDF document font.
PDF Embedded: This is a flag that specifies if a font, of “external TTF” type, should be included in the PDF file or not.
PDF Encoding: This is a string that specifies the name of the encoding to be used for the character coding.


ch07 PVF
((it.businesslogic.Person)$F{MyPerson})
Registration of the fields of a JavaBean
Registration of the fields for a JRExtendedBeanDataSource
 $P!{<parameter name>} : pstmt
BANDS
 print when expression
 the possibility for the band to be break if it is overflow from the page (Split allowed)
 在下半部分双击可以调整宽度
 A double click on the inferior margin allows to resize the band by adapt the height to the content.
 If one or more consecutive bands have zero height, it is possible to increase its dimension by keeping press the Shift button and to move towards the bottom the inferior margin in the band that precedes it.
 

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值