有一數據源 name password sex
001 001 1
002 002 0
003 003 0
004 004 1
...
100 100 1
實現 name password sex name password sex
001 001 1 021 021 0
002 002 0 022 022 1
... ...
020 020 1 040 040 0
--->此為一頁內容假定一頁顯示20條記錄
001 001 1
002 002 0
003 003 0
004 004 1
...
100 100 1
實現 name password sex name password sex
001 001 1 021 021 0
002 002 0 022 022 1
... ...
020 020 1 040 040 0
--->此為一頁內容假定一頁顯示20條記錄
解决方案 »
- Delphi 系統退出時候出現問題
- 请教ACCESS里的查重问题
- 关于DBGridEh统计的问题
- 如何当前系统的界面语言。
- 如何能列举出安装的全部网络协议,EnumProtocols在DELPHI中的参数如何声明?
- 为什么不对:test:=((1,2,3,4,5),(6,7,8,9,10),(11,12,13,14,15) ) ???
- Application.messagebox和messagebox有什么区别呢?
- 能给我发一个delphi自带的installfield安装软件吗,我的光盘找不到了,谢谢
- 请问一个特殊控件,谢谢,一定给分.
- Delphi插件取消关联工程
- 哪位高人修改过Class.pas文件?多谢指教
- 对于TToolButton这样没有Handle的控件要怎么发消息?在线等
问题10: 分栏显示(snaking columns)
name1 name6
name2 name7
name3 name8
name4
name5
窗体添加以下控件Rvsystem1,table1,DataSource1
procedure TForm1.Button1Click(Sender: TObject);
begin
ReportSystem1.Execute;
end;
procedure TForm1.ReportSystem1Print(Sender: TObject);
begin
With (Sender as TBaseReport),Table1 do begin
SetFont('Times New Roman', 20);
Bold := True;
Underline := True;
Home;
PrintCenter('NAME LISTING', PageWidth / 2.0);
SectionTop := 1.0;
MarginBottom := 0.75;
Home;
While not Table1.EOF do begin
SetColumns(2,0.5);
{OnNewColumn will be called after each call to SetColumns and on each
new column after that}
While (ColumnLinesLeft > 0) AND (NOT Table1.EOF) do begin
If FieldByName('NAME').AsString <> '' then begin
Println(FieldByName('NAME').AsString);
end; {if}
Table1.Next;
end; {while}
If not Table1.EOF then begin
NewPage;
end; {if}
end; {while}
end; { with }
end;
procedure TForm1.ReportSystem1BeforePrint(Sender: TObject);
begin
Table1.First;
end;
procedure TForm1.ReportSystem1NewColumn(Sender: TObject);
begin
With Sender as TBaseReport do begin
SetFont('Times New Roman', 14);
Bold := True;
UnderLine := True;
AdjustLine;
Println(' NAME');
SetFont('Arial',12);
AdjustLine;
end; {with}
end;
procedure TForm1.ReportSystem1PrintFooter(Sender: TObject);
begin
With Sender as TBaseReport do begin
MarginBottom := 0.5;
PrintFooter('Page ' + Macro(midCurrentPage)
+ ' of ' + Macro(midTotalPages), pjCenter);
MarginBottom := 0.75;
end; {with}
end;
http://search.csdn.net/Expert/topic/1743/1743788.xml?temp=.7868311新闻组News.Nevrona.com希望对你有点用.
另不要给我留言因为我以后有一段时间不能上网.祝好运.
好像設DataBand1.columns=2就可以
qxj(游民)您的大作小生早就拜讀過了,不過裡面沒有相似的問題。剛給我的代碼我看看先!
謝謝大家!
lhy007(天際漢子) 排列的順序是:
001 002
003 004
005 006
...
我要實現 001 004
002 005
003 006
假如此頁只能有3條記錄
DataBand1.columns=1
rave envent editor 怎麼調用 totalpages 是小問題了,馬上放分,多謝大俠