报表中的小问题,对于各位高手来说应该非常简单(100分)

M

muxj

Unregistered / Unconfirmed
GUEST, unregistred user!
各位高手请帮忙!
1.报表中如何把日期字段变为中文格式,如2002-12-23打印成2002年12月23日。
2、如何把QRsysdata控件也打印成带年月日的中文日期格式?
3、如何设置横向打印?
 
1.用QRLabel,在BeforePrint中寫如下代碼:
QRLabel1.Caption := FormatDateTime('yyyy"年"MM"月"dd"日"',日期字段.AsDateTime);
2.將(1)日期改成當天日期即可.
3.Orientation:=poLandscape
 
楼上的没错
 
1.在QRDBText1控件的OnPrint事件中這樣寫道
value:=FormatDateTime('yyyy"年"MM"月"dd"日"',日期字段.AsDateTime);
2.FormatDateTime('yyyy"年"MM"月"dd"日"',now);
3.設置QuickReport控件的Orientation屬性為poLandscape
 
清理旧贴,不问青红皂白,是非恩怨自行了结,呵呵!
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
回复
0
查看
1K
天地弦
顶部