Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Delphi4]~~急救TQuickRep 列印問題

0 views
Skip to first unread message

FANG, Hong-ming

unread,
Dec 19, 1998, 3:00:00 AM12/19/98
to
透過:

Printer.PrinterIndex;

Printer可自動取得 TPrintDialog 所選到的任
一印表機, 進而以如下的方式順利印到我所
選到的那一部印表機:

with Printer do begin
BeginDoc;
Canvas.TextOut(x, y, cMyString);
EndDoc;
end;

但是, 如果我以Quick Report去設計報表,
並以下述方式列印:

TQuickRep.Print;

這動作似乎只能將報表送至 Windows95/98 的
預設印表機. 它並無法取得我在 TPrintDialog
中所選的印表機, 不論我怎麼選, 報表永遠送到
Windows的預設印表機.

我該如何將TPrintDialog所取得的Printer.PrinterIndex
告知 TQuickRep, 好讓 TQuickRep.Print; 時, 能將
報表送至我真正想印的印表機上???

PQ軟體工作室

unread,
Dec 22, 1998, 3:00:00 AM12/22/98
to

>
>我該如何將TPrintDialog所取得的Printer.PrinterIndex
>告知 TQuickRep, 好讓 TQuickRep.Print; 時, 能將
>報表送至我真正想印的印表機上???
>
>
試試看下列程式

QuickRep.Prepare;
while QuickRep.QRPrinter.Status <> mpFinished;
QuickRep.QRPrinter.PrinterIndex := PrintDialog.PrinterIndex;
QuickRep.QRPrinter.Print;
QuickRep.QRPrinter.Free;
QuickRep.QRPrinter := nil;

===================================
PQ(Perfect & Quick)軟體工作室
e-mail: lanc...@ms18.hinet.net
Tel: 02-27592243 Mr.張
Pager: 0945562037
URL: http://www.taconet.com.tw/pq
===================================


0 new messages