读书人

在fastreport中怎么在第二页不要显示

发布时间: 2012-02-29 16:44:10 作者: rapoo

在fastreport中,如何在第二页不要显示页头??
在fastreport中,打印时如何在第二页不要显示页头??

[解决办法]
procedure TForm1.frxReport1BeforePrint(c: TfrxReportComponent);
var
Cross: TfrxCrossView;
i, j: Integer;
begin
//检查报表里内的控件是否为TfxCrossView
if c is TfrxCrossView then
begin
Cross := TfrxCrossView(c);

Table1.First;
i := 0;
while not Table1.Eof do
begin
for j := 0 to Table1.Fields.Count - 1 do
Cross.AddValue([i], [Table1.Fields[j].DisplayName], [Table1.Fields[j].AsString]);

Table1.Next;
Inc(i);
end;
end;
///给标题赋值
if c is TfrxMemoView then begin
if c.Name='Title' then TfrxMemoView(c).Text:='wtwtest';
end;
end;
[解决办法]
页头上放个Memo,在该Memo的OnBeforePrint事件中加入代码
if <page>=2 then
begin
Memo.visible:=false;
end;
[解决办法]
根本不用这么复杂....你不要把内容放在Pagehead,而是放在ReportHead
这样只会在第一页显示
[解决办法]
是楼上说的: 你不要把内容放在Pagehead,而是放在ReportHead

读书人网 >.NET

热点推荐