Add calculated bar code field to a table

Before you can add a calculated field, you must install JIT-SBP for use with Superbase;

See: Installing for use with Superbase

 

There is an easier way!

The easiest way to print bar codes is to use a reports;

See: Designing reports (*.SBR) to print bar codes

 

Loading our Superbase bar code library

Before you can add a calculated field to your table, you must load our Superbase bar code library CIAXCOM.SBP

See: Loading our Superbase bar code library

 

Now you can add a calculated field to your table;

1) Open a table, or create a new table

To open a table, select menu File | Open | File...

or

To create a new table, select menu File | New | File...

 

2) Add data fields

Your table must contain at least one field before a bar code field can be added.

If you have created a new table, add your data fields.

 

3) Add a calculated bar code fields

- Open your table.

- Select menu File | Modify | File...

To add a field;

- Click the Add... button

- Enter a name for the new field (e.g. MyBarcode)

- Click OK.

- Set Data Type should be Text.

- Check Non-Stored.

If the bar code will be used in other applications (outside Superbase) then uncheck Non-Stored.

- Check Read-Only.

 

4) Format

- Click the Format... button.

- Set the size to 50.

IMPORTANT: To obtain the correct size for the bar code field, use this method 

In this example, the data field (i.e. MyField) is 20 characters - thus the maximum size for the bar code field is;

( Data size * 2 ) + 10 = Barcode size

Example: ( 20 * 2 ) + 10 = 50

- Set the format to Standard.

 

5) Entering a formula

To enter a formula;

- Click the Calculation button.

In this example, we want to create a type of bar code called Interleaved 2-of-5 (ITF).

Note: For each type of bar code, there is a specific function to use. For Code 128 the function is CIA_CODE128$( ), for Interleaved 2-of-5 (ITF) the function is CIA_ITF$( ), ...

See: Bar code functions.

Click OK.

To calculate bar code type Interleaved 2-of-5 (ITF) we use function CIA_ITF$ ( )  

Note: All bar code functions take a single parameter - used to create the bar code. This parameter is a string, or field, or expression that evaluates to a string type.

In this example, we use a field as the parameter;

MyField.MYTABLE

- The complete formula is;

CIA_ITF$( MyField.MYTABLE )

- Click OK.

- Click OK.

 

5) Entering data

Before you enter data, you should load our Superbase bar code library CIAXCOM.SBP

See: Loading our Superbase bar code library

Note: Usually you will create a Superbase program to open load the library and then open the table for entering data.

Bar code fields are calculated automatically when;

 

6) Printing bar codes

To print bar codes, use a report to print the calculated bar code field.

- Create or open your report design.

- Add your data fields, and the calculated field (i.e. MyBarcode) to the report.

- To print bar codes, use a bar code font to print the calculated field.

To print MyBarcode as Interleaved 2-of-5 we use font name CIA ITF Medium, font size 14 points.

Note: For each bar code function, there is a font and font size to use. 

See: Bar code font name and font size to use to discover the font and font size to select.

 

Other methods

To print bar codes it is only required to print the calculated bar code field, and to use the correct bar code font.

Any application can print bar codes, if it can print the bar code field, using the correct bar code font.

 

 


Copyright 2000 CIA (BAR CODES) UK. All rights reserved. Reproduction prohibited.