关于quickrep的问题(50分)

  • 主题发起人 主题发起人 sl1027
  • 开始时间 开始时间
S

sl1027

Unregistered / Unconfirmed
GUEST, unregistred user!
用quickrep进行报表打印
用query查询的数据想分页打印,用quickrep1.NewPage,但到第二页上ColumnHeaderBand
这一栏看不到了别的栏都有,怎样在第二页把ColumnHeaderBand也显示出来。
源码如下:
procedure TForm2.DetailBand1BeforePrint(Sender: TQRCustomBand;
var PrintBand: Boolean);
begin
if abcd <> query1.Fields[4].AsString then
begin
abcd:= query1.Fields[4].AsString;
quickrep1.NewPage ;
end
end;

abcd为全局变量
 
写在ONPreview事件中试试。
 
sl1027,
每页都要出现的内容,你就应该用PageHeaderBand,而不是ColumnHeaderBand。
 
QuickRep1.NewColumn
 
Use the NewColumn method to force a report to move onto the top of the next column. If the report is currently printing the last column of the page, or the report is a single column report, a NewPage call will automatically be issued.
It is advised to always call NewColumn instead of NewPage directly..
See also
TCustomQuickRep
procedure NewColumn
Description
Use the NewPage method to force a report to move onto the next page. You can call this method the AfterPrint event of any band during report generation to manually control the report layout.
It is advised to always call NewColumn instead of NewPage directly..
See also
TCustomQuickRep
不要用 newpage
It is advised to always call NewColumn instead of NewPage directly..
看帮助吧
 
E文不行,不懂。
 
procedure TForm2.DetailBand1BeforePrint(Sender: TQRCustomBand;
var PrintBand: Boolean);
begin
if abcd <> query1.Fields[4].AsString then
begin
abcd:= query1.Fields[4].AsString;
quickrep1.NewColumn;///////////////////////////////////////////*********
end
end;
 
Newcolumn就好
 
多人接受答案了。
 

Similar threads

I
回复
0
查看
444
import
I
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
629
import
I
后退
顶部