home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Tool Box
/
SIMS_2.iso
/
vb_demos
/
spin_vb
/
readme.txt
< prev
next >
Wrap
Text File
|
1993-11-12
|
7KB
|
170 lines
Welcome to the SpinList demonstration program for Visual Basic.
SpinList is a DLL (dynamic link library) that allows you to lay out
reports in your word processor of choice:
Word for Windows
AmiPro
Wordperfect for Windows
Ventura Publisher
or any other Word processor that can read and write report
files in RTF (Rich Text Format) file format.
(SpinList also contains a set of functions designed to allow you to
print reports requiring no graphic formatting quickly and easily, without
going through a word processor. An example of this is also in the
PowerBuilder demonstration program.)
---------- GETTING STARTED ----------
To get started quickly, copy all the files from the diskette to a
directory on your hard disk, and place a copy of SPINLIST.INI in your
Windows directory. Be sure that SPINLIST.DLL and BWCC.DLL are in your path.
SPINLIST.INI defines your default word processor. If it is not
Word for Windows, run SPINDEMO.EXE and from the File menu,
choose Set Word Processor and follow the instructions.
Then start Visual Basic, open FRMMAIN.FRM and run it.
In the main screen, in the section "Word Processor Report Demonstrations",
you can click on buttons 1 through 5 to run 5 different sample reports.
Report 6 does not work with the demonstration version of SpinList, because
the demonstration version is limited to 500 variable substitutions.
Report 7 illustrates usage of a report data file that contains not just data,
but also the name of the report template and the name of the output file to
be created. (SpinList allows you to create a report data file that can
be transmitted to another system on which the report template is located.
The data file can be used to create the graphically formatted report file
by executing a function call that requires no information other than the name
of the data file). Before running Report 7, you must specify the correct path
to the demonstration file 7INI.INI in the single-line edit provided.
Tip: If using Word for Windows, start Word, select Options from the
Tools menu, and in the General options Category, be sure that
Confirm File Conversions is not checked.
Use of SpinList requires only three files:
SPINLIST.DLL (must be in your path)
BWCC.DLL
SPINLIST.INI (this last file must be in your Windows directory)
---------- Laying Out A Report ----------
To lay out a report that SpinList can feed data to, do the following:
1. Design the report in your word processor.
2. Define variables where needed with names starting with &, e.g.,
&LastName.
3. Define the beginning of a repeating line group with a variable
that starts with &&, e.g., &&Item. Define the end of a repeating group
with the symbol &&&. A report may contain multiple and even nested
repeating groups.
4. Save the report template in RTF file format. We suggest using the
suffix .RTF for a report template.
SpinList functions can then feed data to the report template one variable
at a time, or you can create an ASCII file defining variable substitutions
such as &LastName=Jones. To define multiple instances of a report in a
document, e.g., to start a second invoice, send SpinList the reserved
variable &&&&.
Look at the layouts and test data files that are included with this
demonstration for examples of how to send data to SpinList. For instance,
to look at how report 1 was laid out, open file 1DEMO.RTF in your
word processor. To see how data was sent to it, open file 1DEMO.TXT.
---------- Testing Your Report Layout ----------
The program SPINDEMO.EXE allows you to test your report layout, but you
must first build an ASCII file with test data defining the variable
substitutions. We suggest using the suffix .TXT for the ASCII file.
After building your ASCII text file with test data, start SPINDEMO.EXE.
From the File menu in SPINDEMO.EXE, choose Prompt for RTF files.
Specify the Input file name, Output file name and Template file name,
then click on Create to create the report.
The most common problem when first starting with SpinList is a message
stating "Variable ... not found". If SpinList indicates that it cannot
find a variable named &LastName, even though you can see it in your report
template, it is because formatting information was inserted into the
middle of the &LastName string while the template was being designed.
This will not happen very often, and as you get used to building
SpinList report templates it will happen less and less.
If you open the RTF file as a text file and look for the &LastName string,
you will find that it contains some extra formatting commands. For instance,
it might contain "&Last\b\fs32 Name". Remove the extra information, i.e.,
the "\b\fs32 ", so that the variable name appears correctly as &LastName,
and test the template again. Removing the embedded RTF markup will not
affect the report.
In fact, RTF markup can be used within variables sent to SpinList.
The most common RTF markup you may wish to experiment with is the following:
\b Turn boldface on
\b0 Turn boldface off
\fs32 Set font size to 16 (double the font size number)
\ul Turn underline on
\ul0 Turn underline off
For instance, to print the last name in boldface in the string
&Name=Mary Jones
just send
&Name=Mary \b Jones\b0
---------- Word Processors Other than Word for Windows ----------
SpinList has been tested with AmiPro 3.0 , WordPerfect 5.2 for Windows
and Ventura Publisher. It does not work with WordPerfect 5.1
because of bugs in that program's RTF filter.
The demos on this disk have been designed for Word for Windows and
may not all work perfectly with each of the other word processors
due to minor differences in their RTF filters. However, a report
laid out in AmiPro for SpinList will always run successfully with
SpinList, and ditto for the other word processors. A report designed
for one word processor may, however, not work with another.
---------- Limitations ---------------
1. The maximum length of the contents of a variable is 2K bytes.
2. To optimize performance, SpinList allocates memory in contiguous
64K blocks. This may cause a problem on heavily loaded machines
with only 4M of main memory and a small swap file. Your comments
on this will be appreciated, because we can easily adjust this.
3. This version of SpinList requires that grids (tables) be laid out
in your word processor in advance. The next version, which is
already in alpha test and due out in January or February of 1994
will provide full support for dynamic grids, i.e., reports defined
at runtime and not laid out in advance.
---------- Order Information ----------
To order SpinList, use the order form that came with the demo or call
OSoft Development Corporation
2964 Peachtree Road
Suite 350
Atlanta, Georgia 30305
Tel: (404) 233-1392
Fax: (404) 237-0706
This demo disk may be duplicated and distributed freely.