Please enable JavaScript to view this site.

Navigation: Frequenty Asked Questions

Populating 2D barcode with more than 132 characters

Scroll Prev Top Next More

In the Cobwebb Designer the Barcode Properties Data box only allows you to enter up to 132 characters of data. With the advent of 2D barcodes these can require many more characters. The way to solve this problem is to add your barcode data into multiple Variables and then use a combination of the variables to populate the barcode Data.

For example, as Variables can only hold up to 132 characters, you would need to create several to make up the total number of characters for your barcode.

Use the following steps to create your Barcode element - here we will assume that our barcode data length is 204.

1.Create two Variables say BCDATA1 and BCDATA2.

2.Populate the Variables with your barcode data.

This can either be done by manually typing the information into the Data box in the Variable Properties, picking up information from the Spooled File or using an Exit program to extract the information from a database. Note: If you were using an Exit Program you would first call the Exit Program to return the barcode data split over two (or more) parameters e.g. PARM1 and PARM2, and then populate the Variables you have just created by entering ?PARM1 or ?PARM2 etc. in the Data box e.g.

Creating a Variable from a PARM

In the above scenario PARM1 would contain the first part of the barcode (up to 132 characters) and PARM2 the second part (again up to 132 characters).

3.Once you have the barcode data stored in your Variables you can then concatenate this information in the Data box in your Barcode e.g. ?BCDATA1??BCDATA2? - for more details please refer to Multiple Variable & Parameter substitution.

Barcode using Variable substitution

4.The last step is to change the Width of the barcode to 204 (or whatever is the correct length for the data in your two Variables) as shown above, because the Width automatically defaults to the width of the text typed in which isn't enough for the data which is stored in the variables.