procedure PrintColLine(Const ItemList:TStringList;Const X,Y:Integer);
Var
PointLeft :Integer;
Count :Integer;
Begin
PointLeft :=X;
for Count :=0 to ItemList.Count -1 do
Begin
Printer.Canvas.TextOut(Round(PointLeft * ratio),Round(Y * ratio),
ItemList.Strings[Count]);
PointLeft :=PointLeft+Integer(ItemList.Objects[Count]);
End;
End;
procedure PrintDBGridTitle(Const SourceDBGrid:TDBGrid);
Begin
End;
procedure PrintDBGridItem(const SourceDBGrid:TDBGrid;Const X,Y:Integer);
Begin
End;
function PrintDBGrid(Const SourceDBGrid:TDBGrid;Const IsVertical: Boolean):Boolean;
var
OrigPPI: Integer;
CountRow :Integer;
ItemList :TStringList;
PointX,PointY :Integer;
begin
Result :=False;
ratio := 14; //打印纸与DBGRID比例
//Printer.PageWidth / SourceDBGrid.Width;
OrigPPI := Printer.Canvas.Font.PixelsPerInch;
Printer.Canvas.Font.PixelsPerInch := Round(Printer.Canvas.Font.PixelsPerInch * ratio);
if IsVertical then //横竖打印
Printer.Orientation := poPortrait
else
Printer.Orientation := poLandScape;