Paradox Community
Search:

 Welcome |  What is Paradox |  Paradox Folk |  Paradox Solutions |
 Interactive Paradox |  Paradox Programming |  Internet/Intranet Development |
 Support Options |  Classified Ads |  Wish List |  Submissions 


Paradox Newsgroups  |  Paradox Web Sites  |  Paradox Book List  |  FAQs From The Corel FAQ Newsgroup  



Subject: FAQ:PdoxWin:Printing to a named File:1999.12.01

Version 1.0 (1999.12.01)
edited by Paradox FAQ Team
Repost by Mike Irwin: 2001.02.10

====================
0. Introduction
====================

This FAQ addresses the problem of creating files from
Paradox output. For example, the creation of files that
are destined for export and use elsewhere.
This FAQ is oriented towards users of Windows NT 4. I
believe that it is possible to do the same thing in Win 9x,
but Win 95 certainly doesn't make it apparent.

-------------------------------
 0.1 Legal Info and Disclaimers
-------------------------------

Paradox is a trademark of Corel.
Borland Database Engine (BDE) is a trademark of Inprise.

The information provided in this FAQ is provided "as is" 
and is not warranted in any way. The information provided 
in this FAQ is not endorsed or authorized by Corel or 
Inprise in any shape, form, or manner. 

The editors claim NO responsibility for ANY illegal 
activity regarding this file, or as a result of someone 
reading this file.

You may distribute this file, as long as the copies are
complete, unaltered, and are in electronic form only.

-------------
 0.2 Feedback
-------------

Please send feedback in a Corel Paradox newsgroup or the
news:comp.databases.Paradox newsgroup to any of the FAQ
Team mentioned in the "FAQ: FAQ FAQ" document.
Please preface the subject of your post with the string
"PDXWIN FAQ" to alert Team members to the function of
the message.

Please specify the FAQ name and section number the
comment applies to, if any.

==============================
1. General Printer Information
==============================

Windows systems provide logical "ports" to which an
application like Paradox can print.

Ports can equate to the three traditional printer ports,
LPT1, LPT2, & LPT3. However, that's not all ! If you've
ever installed software such as Corel Ventura Publisher,
you may well have a port called "Barista". Adobe Acrobat
(not the reader) will add "Acrobat PDFWriter" and 
"Distiller Assistant v3.01" (for that version). V3, Inc. 
produce a fax system for Windows NT, and that adds a port 
called "FAX32COMponent Printer", to which you print.

You can create your own, too, and that's what you can take
advantage of in order to make printing to disk simple.

========
2. Why ?
========

Because you may want to produce a number of output files
from reports without having to attend to Paradox all the
time. The point of this is to automate the output function
as much as possible.

==========
3. Example
==========

This example takes the form of how someone can produce
postscript report files for delivery to another person.

--------------------
3.1 Setting up the Printer Port
--------------------

* Click the Start button
* Select Settings | Printers
* Add a local Printer
* Click on "Add Port"
* Select "local port"
* Click on "New Port ..."
* Enter a filename. For example, something like
C:\ps\outputfile.ps (C:\ps must already exist).
* Click on "Close" and you'll see that a port named C:\ps
\outputfile.ps is present and selected in the port list.
* Click on "Next"
* Select the printer whose driver you want to use to 
generate the postscript. I happen to like Apple's output. 
There is absolutely no need to use a printer you have, or 
even one you have ever heard of ! However, if you can find 
out what printer it will be eventually printed on, you 
should definitely use a driver for that printer.
Note. If you want to output colour, select a colour
printer !
* Choose whether this should be the default printer or not.
* Choose whether to share it or not
* Finish with the Printer Installation wizard, and load a 
copy of your Win NT disk to provide the driver software.

--------------------
3.2. Using it from Paradox
--------------------

You use the new printer port just as you would any other in
Paradox. However, if you wish to produce multiple output
files, you will need to write a small script. Lets assume
that a table holds the names and some associated data to be
used as criteria to obtain data which will then be printed
to file. 

scan tcControlData: ;for each record in the control 
table...
   cmDoQuery(tcControlData) ;get the data for this record
   cmPrintReport() ;print the report to the new "printer"
   sleep(10000) ;wait for the printing to finish
;----give printout file new name
   execute("cmd /e rename c:\\ps\\outputFile.ps" + " " +
    "c:\\ps\\"+tcControlData."filename")
endScan


Paradox Community Newsgroups


 Feedback |  Paradox Day |  Who Uses Paradox |  I Use Paradox |  Downloads 


 The information provided on this Web site is not in any way sponsored or endorsed by Corel Corporation.
 Paradox is a registered trademark of Corel Corporation.


 Modified: 15 May 2003
 Terms of Use / Legal Disclaimer


 Copyright © 2001- 2003 Paradox Community. All rights reserved. 
 Company and product names are trademarks or registered trademarks of their respective companies. 
 Authors hold the copyrights to their own works. Please contact the author of any article for details.