unit ColumnsForm;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  BaseForm, AnyPrint, AnyGrids, ComCtrls, Buttons, ExtCtrls;

type
  TfrmColumns = class(TfrmBase)
    procedure AnyGridGetPageBreak(Sender: TObject; Row: Integer;
      var ToBreak: Boolean);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmColumns: TfrmColumns;

implementation

{$R *.DFM}

procedure TfrmColumns.AnyGridGetPageBreak(Sender: TObject; Row: Integer;
  var ToBreak: Boolean);
begin
  ToBreak:=Row=29;//遇到第30行就分页
end;

procedure TfrmColumns.FormCreate(Sender: TObject);
begin
  inherited;
  Report.PageColumns:=2;//每打印页分两栏打印
end;

end.
