Click here to Skip to main content
15,905,238 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Team,
We are using crystal reports to generate the reports with bar code labels using UPC A Half Height Font. In our application there are multiple UPC formats like UPC(12 characters), EAN(13 characters) and GTIN(14 characters) which is prepared and saved on database.
While generating the bar code report with UPC(12 characters) with **UPC A Half height font** it is scanning properly with Scanner. We are using the following formula to calculate the bar code string in crystal report.

if {UPCData.upcNo}<> "" then
(
Local StringVar pUPC := ({UPCData.upcNo});
Chrw(Ascw(mid(pUPC,1,1))+32)+
Chr(Asc(mid(pUPC,2,1)))+
Chr(Asc(mid(pUPC,3,1)))+
Chr(Asc(mid(pUPC,4,1)))+
Chr(Asc(mid(pUPC,5,1)))+
Chr(Asc(mid(pUPC,6,1)))+
Chr(112)+
Chr(Asc(mid(pUPC,7,1))+16)+
Chr(Asc(mid(pUPC,8,1))+16)+
Chr(Asc(mid(pUPC,9,1))+16)+
Chr(Asc(mid(pUPC,10,1))+16)+
Chr(Asc(mid(pUPC,11,1))+16)+
Chr(Asc(mid(pUPC,12,1))+48)
)

The above code is working with 12 characters but where as for EAN(13 characters) and GTIN(14 characters) we dont know how to format the given string which is more then 12 digits to support the UPC A Half Height Font for EAN and GTIN types.
Please help me to resolve it.

Thanks,
Chakradhar.

What I have tried:

I have tried to change the above formula to work with 13 characters by but it is not scanned.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900