! am having some problems in encoding a large amount of data into a PDF417 barcode within Crystal reports, I have read the help and the Crystal Reports example but it doesn’t really answer my issuse.
We are using Crystal reports 8.5 and I have no problem in producing relatively small PDF417 bar codes (50 – 60 bytes) so I think my basic methodology is correct.
To summarize the issue:-
I have a VB6 program writing data to an SQL database.
The Crystal Report has an ODBC link to the SQL Server database and produces a box contents list which it prints on the report. The aim is to also encode the box contents into a PDF417 bar code so that our customers can scan the contents directly into their goods receiving system. Up ‘til now (last 4 years) we have produced the PDF417 bar code using Zebra printers (using ZPL language output to the printer from within a VB6 program) onto a label which we then stick onto the box report. Each line record is 40 bytes (before encoding to PDF417 format) and there maybe up to 22 records on each sheet – hence a maximum bar code size (pre-encoded) of about 900 bytes. Each line record is delimited with a carriage return line feed prior to encoding.
We now wish to directly print the bar code onto the foot of the report.
I have total control over how I save the data in the SQL database – as one massive string (up to 900 bytes) or chopped up into substrings saved in separate fields within the SQL table.
I have tried both but in the first case (big 900 byte record) the size limit within Crystal Reports functions means I do not have access to the field within the function editor. I have therefore tried the other approach by saving each line record with a different field name in the database (Label1 to Label22).
I then go through the process of creating a separate formula field for each database field, using the encode function. Finally I add a text object to the foot of the reports and insert the 22 fomula fields into the text object and set the font to the relevant Morovia PDF417 font.
A bar code is produced but it is not formatted properly.
I have tried changing the value of trunk_no but am not totally clear exactly how this should be used. I have tried trunk 1 for all fields, trunk 1 to 22 for each field separately and grouping them so that fields 1 to 3 have trunk 1, 4 to 6 trunk 2 etc. In all cases I get a (different) bar code but all of them are not formatted correctly ( e.g varying width along the height of the bar code).
Can anyone advise how I can resolve this?
__________________
Barry Moorhouse
Centaur Services Ltd
