如何在Delphi7中将QuickRep报表分栏?
如何在Delphi7中将QuickRep报表分栏?
因为维护旧程序的原因,有时还用到Delphi7自带的QR报表,要设计的报表作如下方式打印:
Line 1 record #1 | record #2
Line 2 record #3 | record #4
Line 3 record #5 | record #6
Line 4 record #7 | record #8
Line 5 record #9 | record #10
<一>、如果在QR的page-->columns设置为4列,则出现下面的报表
qr的分栏效果(report setting中设置)是
Line 1 record #1 | record #6
Line 2 record #2 | record #7
Line 3 record #3 | record #8
Line 4 record #4 | record #9
Line 5 record #5 | record #10
<二>不用<一>的设置方法,用以下方法就可以实现:
请不要将报表分栏, 假若要打印的栏位为三栏
Column#1 Column#2 Column#3
要打印的报表为
Report Title
==============
Column#1 Column#2 Column#3 Column#1 Column#2 Column#3
========================== ==========================
QRText1 QRText2 QRText3 QRText4 QRText5 QRText6
注意控件的建立顺序,可用View as text查看!
在QRDBText4之OnPrint事件中写下下面代码即可,注意是QRText4的OnPrint:
....
DataSet.Next;
Column#1 Column#2 Column#3
要打印的报表为
Report Title
==============
Column#1 Column#2 Column#3 Column#1 Column#2 Column#3
========================== ==========================
QRText1 QRText2 QRText3 QRText4 QRText5 QRText6
注意控件的建立顺序,可用View as text查看!
在QRDBText4之OnPrint事件中写下下面代码即可,注意是QRText4的OnPrint:
....
DataSet.Next;
......