Home > Archive > Programming with dBASE > February 2006 > Printer selecting









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Printer selecting
J. Trouwborst

2006-02-03, 1:23 pm

Hello,

I use Dbase V2.2 and for the printing ActiveX in the forms.
Is there a possibility to choose a printer (installed in Windows) for
printing.
I use the following statement in the form to print

local nResults, ax
ax=form.activex1.nativeobject
ax.reportfilename=" \\server\db2kdata\re
ports\ZENDRAPPORT.rpt"
ax.destination=1
nresults=ax.printreport()
form.close()

Please help me with this.

Thanks in advance


Todd Kreuter

2006-02-04, 1:23 pm

"J. Trouwborst" wrote:
>
> Hello,
>
> I use Dbase V2.2 and for the printing ActiveX in the forms.
> Is there a possibility to choose a printer (installed in Windows) for
> printing.
> I use the following statement in the form to print
>
> local nResults, ax
> ax=form.activex1.nativeobject
> ax.reportfilename=" \\server\db2kdata\re
ports\ZENDRAPPORT.rpt"
> ax.destination=1
> nresults=ax.printreport()
> form.close()
>
> Please help me with this.
>
> Thanks in advance


Is it printing to the Windows default printer, or to the _app.printer?
_app.printer is initially the Windows default printer, but can be
changed using _app.printer.choosePrinter(). If its printing to the
Windows default printer, I would think that the printer would need to be
changed through the ActiveX.

--
Todd Kreuter [dBVIPS]
J. Trouwborst

2006-02-04, 8:23 pm

Hello Todd,
I want to choose another then the default printer in Windows before Dbase is
going to print the file ZENDRAPPORT.rpt
Thanks



"Todd Kreuter" <tkreuter@dbvips.usa> schreef in bericht
news:43E4F038.8422DB5F@dbvips.usa...
> "J. Trouwborst" wrote:
>
> Is it printing to the Windows default printer, or to the _app.printer?
> _app.printer is initially the Windows default printer, but can be
> changed using _app.printer.choosePrinter(). If its printing to the
> Windows default printer, I would think that the printer would need to be
> changed through the ActiveX.
>
> --
> Todd Kreuter [dBVIPS]



Todd Kreuter

2006-02-06, 1:23 pm


"J. Trouwborst" wrote:
>
> Hello Todd,
> I want to choose another then the default printer in Windows before Dbase is
> going to print the file ZENDRAPPORT.rpt


Right. But I was wondering if it was picking up the default printer from
Windows or from dBASE. Try changing the dBASE default printer (which is
initially the same as the Windows default) and run the report. If it
continues printing to the Windows default, then I'm afraid you will need
some API to change the printer.

To change the dBASE default printer, from the command line do:

_app.printer.choosePrinter()

--
Todd Kreuter [dBVIPS]
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com