Jasper report

 

Author:

js

Module:

<Finrpt>

Summary:

Jasper report

Version/Date:

<10.6> / <10-May-2012>

 

Content:

1.    remove the blank line in the report

For e.g. there are 3 boxes and show 3 lines at the generated  report, now the user want remove the blank one,  when the second line is blank, the third one should up.

 

2.    Knowledge content

      We can use one box instant of 3 box, and use the linefeed character(\n) change the new line, but some time the fields type are different, we should convert the field type to String type,

                The expression of convert the Date type to String type:

                                new java.text.SimpleDateFormat("H:m:s").format(new java.util.Date())

                The expression of convent the BigDecimal type to String type:

                                new java.text.DecimalFormat("#,##0.00").format(122.00)

 

 

Attached:

1)      The meaning  of the String which in the SimpleDateFormat as below:

   Letter Date or Time Component Presentation Examples:

G Era designator Text AD

y Year Year 1996 96

M Month in year Month July Jul 07

w Week in year Number 27

W Week in month Number 2

D Day in year Number 189

d Day in month Number 10

F Day of week in month Number 2

E Day in week Text Tuesday Tue

a Am/pm marker Text PM

H Hour in day (0-23) Number 0

k Hour in day (1-24) Number 24

K Hour in am/pm (0-11) Number 0

h Hour in am/pm (1-12) Number 12

m Minute in hour Number 30

s Second in minute Number 55

S Millisecond Number 978

z Time zone General time zone Pacific Standard Time PST GMT-08:00

Z Time zone RFC 822 time zon

 

2)      The Expression of Change the String type to Date or BigDecimal type:

new java.text.SimpleDateFormat("H:m:s").parse(String text)           Parses text from a string to produce a Date.

new java.text.DecimalFormat("#,##0.00").parse(String text)           Parses text from a string to produce a Number.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值