有一數據源  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條記錄

解决方案 »

  1.   

    可参考以下程序。
    问题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;
      

  2.   

    以前总结RAVE的一个贴子
    http://search.csdn.net/Expert/topic/1743/1743788.xml?temp=.7868311新闻组News.Nevrona.com希望对你有点用.
    另不要给我留言因为我以后有一段时间不能上网.祝好运.
      

  3.   

    好久不用rave 了,
    好像設DataBand1.columns=2就可以
      

  4.   


          qxj(游民)您的大作小生早就拜讀過了,不過裡面沒有相似的問題。剛給我的代碼我看看先!
      謝謝大家!
      

  5.   

    trainbox(rain)  临时表怎麼加到裡面,能否具體些 在線等
      

  6.   


         lhy007(天際漢子)  排列的順序是:
                   001    002
                   003    004
                   005    006
                      ...
          我要實現     001      004
                                002    005  
                                003    006
                               假如此頁只能有3條記錄
      

  7.   

    Region1.columns=2
    DataBand1.columns=1
      

  8.   

    lhy007(天際漢子) 還差一點就成功了,現在是位置有點不對,解決後放分
      

  9.   


         rave envent editor  怎麼調用 totalpages 是小問題了,馬上放分,多謝大俠