| Visual Documents is a tool for building Rich Text
documents with Visual FoxPro. It includes a document processing object, a printer object,
and the optional TX Text Control® for displaying and printing. Documents are built under program control, from templates created in a word
processor. Formatted text, graphics, tables, bulleted items, multiple columns, and most
other word processing features are easy to include. Visual Documents is especially useful
for producing documents such as insurance policies, legal contracts, bids, deeds, job
estimates, etc. that would be beyond the ability of standard report writers.
There are 3 basic steps to creating documents using
the VisDocs Document Processing class:
- Create a template RTF document in any word processor
- Write program code to build the document contents. This typically
includes one or more looping constructs to cycle through the data records used to build
the document.
- Print, fax, email, or store the resulting document
There are a number of options available for printing, viewing, and
editing the documents you create. Each option has some advantages and disadvantages.
Printing with MS Word
One way to print or view the generated RTF documents is by using a
word processor like Microsoft Word, or other similar product that supports OLE automation.
Advantages of using MS Word
MS Word offers the most complete set of document formatting
capabilities. Other RTF controls only offer varying subsets of the functionality available
in MS Word.
Disadvantages of MS Word
It is slower than other methods, especially the first time an
instance of Word needs to be started.
It requires that each client have MS Word licensed and installed.
This can make your application very expensive to use if your users do not already have
Word.
It is less reliable than other methods, especially if your users are
using word for other purposes at the same time as they are running your applications.
You can run into compatibility problems when users change to
different versions of the word processor.
Printing with MS RichTextBox Control
The Microsoft RichTextBox control is available free
from Microsoft. It is included as part of Visual Studio, and other Microsoft products.
Advantages of RichTextBox
It allows you to View and Print directly from within VFP.
It supports character formatting and simple graphic images.
It is very fast and efficient, when compared to using an external
word processor, such as MS Word.
Unlimited royalty-free distribution
Disadvantages of RichTextBox
The RichTextBox control only supports a single page. Although, you
can simulate multiple pages by displaying and/or printing a series of 1-page documents.
No support for table layouts in your documents
No support for page headers or footers
Printing with TX Text Control ®
Probably the best, all around
solution for printing RTF documents is the TX Text Control, made by The Imaging Source,
GmBH. This control provides a complete Word Processor, packaged as an ActiveX
control. You can use the control to print, preview, or edit the output from Visual
Documents. Using the TX Text Control means your application will not have to rely on any
outside word processor for printing.
VisDocs includes a number of enhancements for TX
Text Control that enable it to work properly with VFP. TX Text Control is available from us at a
discounted price when bundled with Visual Documents. For more detailed information on TX
Text Control, and a full functioning demo version, visit www.textcontrol.com.
Advantages of TX Text Control
It allows you to View and Print directly from within VFP.
It is very fast and efficient, when compared to using an external
word processor, such as MS Word.
It supports a much wider subset of the full document formatting
capabilities of MS Word, including multiple pages, tables.
Regular version of TX lets you display and print page headers &
footers, but not edit them. Professional version of TX also lets end users edit page
header & footers.
You can use it to build a full Word Processor interface into your VFP
applications.
Unlimited royalty-free distribution
Disadvantages of TX Text Control
It does not support certain MS Word extensions to the RTF standard.
These include things like certain line formats, certain table cell fill patterns, certain
style sheet properties, and some other minor formatting details. However, in most cases,
there are alternative means for representing the desired effects.
|