QuickRep控件打印,头痛(0分)

  • 主题发起人 主题发起人 messagebox
  • 开始时间 开始时间
M

messagebox

Unregistered / Unconfirmed
GUEST, unregistred user!
操作系统:ms windows2000
报表控件:QuickRep
procedure TForm1.FormCreate(Sender: TObject);
var
Device : array[0..cchDeviceName - 1] of Char;
Driver : array[0..(MAX_PATH -1)] of Char;
Port : array[0..32]of Char;
hDMode : THandle;
pDMode : PDevMode;
begin
Printer.GetPrinter(Device,Driver,Port,hDMode);
if hDMode <> 0 then
begin
pDMode := GlobalLock(hDMode);
if pDMode <> nil then
begin
pDMode^.dmPaperSize := 256;
pDMode^.dmPaperLength := 500;
pDMode^.dmPaperWidth := 3000;
pDMode^.dmFields := pDMode^.dmFields or DM_PAPERSIZE;
pDMode^.dmFields := pDMode^.dmFields or DM_PAPERLENGTH;
pDMode^.dmFields := pDMode^.dmFields or DM_PAPERWIDTH;
ResetDC(Printer.Handle,pDMode^);
GlobalUnlock(hDMode);
end;
end;
with Printerdo
begin
Orientation := poPortrait;
begin
Doc;
Canvas.TextOut(10,10,'fdsafdsfds');
EndDoc;
end;
end;

直接使用上述函数可以控制打印机的走纸,
怎么与QuickRep报表的打印相结合起来呢?
 
不会!帮你顶!
 
后退
顶部