Large PDF417 Bar Codes in CR 8.5
3 posts • Page 1 of 1
Large PDF417 Bar Codes in CR 8.5
! 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
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
- bmoorhouse(Legacy Member)
Re: Large PDF417 Bar Codes in CR 8.5
We answered your inquiry in email. Please check.
Some highlights when creating PDF417 barcodes in Crystal Reports:
1. The data and formula fields in Crystal Reports can not hold more than 255 characters. You need to split into pieces if the length exceeds.
2. When calling PDF417Encode function you should pass all the data to the function. You can not pass a slice of data one time and assemble the results. Fortunately StringVar in CR can hold much more text, so you can define a field as below:
StringVar completeData:={TestData.column1}+{TestData.column2}+... + {TestData.columnn);
MoroviaPDF417Encode(completeData, N)
The first statement assembles all the data fields into one variable. the second statement retrieve the trunk N of the encoding results.
3. The trunk is used to circumvent the length issue. If you have a large amount of data, you need to find out the number of trunks you will need. This is can be done by using PDF417 GUI encoder. Make a barcode, and calculate the total characters. Divide the number by 200. You can use a number larger than you need.
4. After defining all the trunk fields, create a text object in CR and place it in the place you desired. Drag and drop the trunk fields one by one to this text object. Format the text object with PDF417 font.
Some highlights when creating PDF417 barcodes in Crystal Reports:
1. The data and formula fields in Crystal Reports can not hold more than 255 characters. You need to split into pieces if the length exceeds.
2. When calling PDF417Encode function you should pass all the data to the function. You can not pass a slice of data one time and assemble the results. Fortunately StringVar in CR can hold much more text, so you can define a field as below:
StringVar completeData:={TestData.column1}+{TestData.column2}+... + {TestData.columnn);
MoroviaPDF417Encode(completeData, N)
The first statement assembles all the data fields into one variable. the second statement retrieve the trunk N of the encoding results.
3. The trunk is used to circumvent the length issue. If you have a large amount of data, you need to find out the number of trunks you will need. This is can be done by using PDF417 GUI encoder. Make a barcode, and calculate the total characters. Divide the number by 200. You can use a number larger than you need.
4. After defining all the trunk fields, create a text object in CR and place it in the place you desired. Drag and drop the trunk fields one by one to this text object. Format the text object with PDF417 font.
- glitch (legacy member)
Re: Large PDF417 Bar Codes in CR 8.5
If you are working on CR version 8.5 or earlier, read this article:
http://www.morovia.com/support/article10052.html
http://www.morovia.com/support/article10052.html
- glitch(Legacy Member)
3 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests