Section 11
Scan Line Definitions
The Scan Line Definitions table permits you do define document scan
codes
to the program. There are very specific requirements for your scan line
in order to
properly use this table.
When you select the "Add" option for a transaction, the program will
display the
line item entry screen. If you have a scannable document, you can click
on the "Scan" button
and a special entry field will appear near the top of hte screen.
This field is where you will scan in your document with your OCR or Bar
Code scanner.
In order for the document to be scanned used this feature your scan line
must contain at least
three separate fields. This are the
Tran_Code,
Reference_Number, and
Tran_Amount. The
there can be additional
reference_number fields
in
the scan line. This option is discussed below.
The fields can be in any order, but the normal order is as described
above, and used in the example
presented here. One working assumption is that the scan line consists of
a fixed number of digits
and that each scan line is the same as far as the field order and field
sizes within the scan line.
If you have multiple document types with scan lines for each one, the
scan line can be of different
lengths -- you will just need to create a record in the scan line defs
table for each different one.
If your scan line contains delimiters between
the fields such as a dash or '/' character, you can define the starting
and
ending positions for the actual data fields to skip over the delimiters.
To facilitate our discussion of how this table is used, assume your scan
line looks like this:
In this scan line sample, the
Tran_Code is
1234, the
reference # is
0987654321, and the
amount is
11.22 (implied
decimal).
The job of the settings in the Scan Line Definitions table is tell the
program how to break the
scan line into the required fields so the program can place them where
they belong on your entry
screen. Once you click on the Scan button, the program waits for you to
scan in your document.
It then counts the number of digits scanned, and based on this value it
assembles a scan line
"key value" that consists of the literal text
SCANLINE-
plus the number of characters in the scan
line. So, in our example, the scan line is 4+10+8 (22) digits long, so
the key value would be
SCANLINE-22. Assuming such a key value actually
exists, the program will retrieve the values
for each of the columns in the table, then it will use those values to
split the scan line into
its separate fields.
Each field in the table is listed, along with a short description,
below:
- SCANKEY
This is the literal text SCANLINE-
followed by
the length of the scan line. For example, SCANLINE-22.
-
TRAN_CODE
This is the literal text TRANCODE. It is there to
help you remember that the first defined field is the
Tran_Code. It is actually
ignored by the program, so if it is not set to TRANCODE, there will not be any
error.
-
TRAN_CODE_START
This is the starting position of the tran_code within
the scan line. In our example, it would be 1, but the Tran_Code can be placed
anywhere within the scan line if desired.
- TRAN_CODE_SIZE
This is the size of the Tran_Code. In our example, this
value
would be 4, but in the RASWIN
program, the Tran_Code can be
any size from 1 to 30 bytes.
-
The next groups of parameters that are used to define
the additional
fields in a scan line. These are described here as F1, but there are actually
five sets, labeled F1 through F5. They all work the same
way. In most cases you
will use only F1, F2,
and F3 is used to define
the amount field.
F4 and F5 are currently not used
for any purpose.
F1_NAME
This is whatever field name you wish to assign to this
portion of
the scan line. For example, it might be something like
Account Number. This is
for reference only.
F1_START
This tells the program where the field starts.
In our example it would be 5,
since
the account number starts in column 5.
F1_SIZE
The size of the field. In our example 10 is the correct value.
F1_PROMPT
If you want the program to include some literal text
before the
actual data value extracted from the scan line, you can
place it here. For example,
you might wish the collected data value to read: ACCOUNT#:9876543210
instead of just
the data value itself. If this were the case, you would
put ACCOUNT#: in the
prompt field. If you don't want any literal text prefix,
leave this value blank.
F1_OUTSIZE
if you want the output value to be padded to the right
with spaces
beyond the size of the field value, specify this value
here. For example, if the value was to include
the prompt as described above, the value for this field
would be the total size of the two portions
of the output ('ACCOUNT#:', 9 bytes) + '9876543210' (10
bytes), or 19 total. If you wanted
a space or two between this output value and the next
field (if applicable) you could set the
size of this field to 20 or
21.
At this point, you may be wondering how you might use
more than one output field. Say for
example, you wanted to scan 2 reference number fields
from the scan line - such as a CUSTOMER NUMBER, and an INVOICE NUMBER. In your output line you
want these fields to be shown as
CUST#:1234567890
INVOICE#:9876543210
In the field one portion you would define the location
for the customer number, and in the
field 2 portion you would define the location for the
invoice #. If you wanted these values
in your output line as:
INVOICE#:9876543210
CUST#:1234567890
you would reverse the field 1 and field 2 references.
As noted earlier, the amount field is defined in field
#3. The starting position and size values
for our example would be 15 and
8, respectively.