BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Input tray in QR

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Reporting-Charting
View previous topic :: View next topic  
Author Message
Robert
Guest





PostPosted: Sat Oct 23, 2004 2:10 pm    Post subject: Input tray in QR Reply with quote



Is there any simple way to specify programmatically an input tray using QR?

Robert


Back to top
Mike Shkolnik
Guest





PostPosted: Tue Oct 26, 2004 12:37 pm    Post subject: Re: Input tray in QR Reply with quote



Do you need the TQuickRep.PrinterSettings.OutputBin?

--
With best regards, Mike Shkolnik
EMail: [email]mshkolnik (AT) scalabium (DOT) com[/email]
http://www.scalabium.com

"Robert" <ngsemail2000 (AT) yahoo (DOT) com> wrote

Quote:
Is there any simple way to specify programmatically an input tray using
QR?

Robert





Back to top
Robert
Guest





PostPosted: Tue Oct 26, 2004 12:59 pm    Post subject: Re: Input tray in QR Reply with quote




"Mike Shkolnik" <mshkolnik2002 (AT) ukr (DOT) net> wrote

Quote:
Do you need the TQuickRep.PrinterSettings.OutputBin?


No, the input tray. Customer uses two kinds of paper, we need to determine
programmatically which paper to use.

Robert



Back to top
Mike Shkolnik
Guest





PostPosted: Tue Oct 26, 2004 8:57 pm    Post subject: Re: Input tray in QR Reply with quote

This is not a bug of QR. There is no any API to change the input paper tray.
Only API for installed printer driver can have some own extended functions
to control this property and you must call these functions from Delphi
before QR.Prepare - just read the documentation for your printer

--
With best regards, Mike Shkolnik
E-mail: [email]mshkolnik (AT) scalabium (DOT) com[/email]
WEB: http://www.scalabium.com

"Robert" <ngsemail2000 (AT) yahoo (DOT) com> wrote

Quote:

"Mike Shkolnik" <mshkolnik2002 (AT) ukr (DOT) net> wrote in message
news:417e4528$1 (AT) newsgroups (DOT) borland.com...
Do you need the TQuickRep.PrinterSettings.OutputBin?


No, the input tray. Customer uses two kinds of paper, we need to determine
programmatically which paper to use.

Robert





Back to top
Robert
Guest





PostPosted: Tue Oct 26, 2004 9:37 pm    Post subject: Re: Input tray in QR Reply with quote


"Mike Shkolnik" <mshkolnik2002 (AT) ukr (DOT) net> wrote

Quote:
This is not a bug of QR. There is no any API to change the input paper
tray.
Only API for installed printer driver can have some own extended functions
to control this property and you must call these functions from Delphi
before QR.Prepare - just read the documentation for your printer


Thanks Mike. It does look a bit ugly and mostly DOSish, to have to put
printer dependent code in the app. I wonder if there is a more clever
solution. What would happen if we install two printers, one with upper tray
default, one with lower tray default, and work it out by selecting a printer
instead of a tray? That way, the printer software would be responsible for
setting the properties.

I found this code in a ng, seems to work but I still don't have the warm
fuzzy about it. What do you think of the multiple printer solution?

Robert

procedure SetPrinterPageSource(PaperSource: Word);
var
DeviceName,
PortName,
DriverName : array[0..255] of Char;
DeviceMode : THandle;
DevMode : PDevMode;
begin
Printer.GetPrinter(DeviceName, DriverName, PortName, DeviceMode);
DevMode:= GlobalLock(DeviceMode);
with DevMode^ do begin
dmDefaultSource:= PaperSource;
end;
GlobalUnlock(DeviceMode);
Printer.SetPrinter(DeviceName, DriverName, PortName, DeviceMode);
end;


// DMBIN_UPPER
// DMBIN_LOWER




Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Reporting-Charting All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.