Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

BarCode: Code128 -> EAN128

[es] :: Access :: BarCode: Code128 -> EAN128

[ Pregleda: 6224 | Odgovora: 6 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

CandyMan

Član broj: 3420
Poruke: 147



+49 Profil

icon BarCode: Code128 -> EAN12830.03.2009. u 12:51 - pre 183 meseci
Zdravo,

Imam neku simpaticnu aplikaciju ( http://about280.com/barcodedatabase.html ) koju sam prepravio da mi generise kodove, ali me interesuje kako bih mogao da je prepravim da umesto Code128 generise EAN128 (GS1-128, UCC... kako vec...). Vecina tekstova na netu kaze da se EAN128 razlikuje od Code128 za neki FNC1 karakter koji kod EAN128 nalazi odmah iza start karaktera. FNC1 nema ASCII reprezentaciju, a nasao sam da se kodira sa "411131". Pokusao sam postojeci Code128 da promenim tako sto sam iza start koda "211214" odmah nalepio "411131" i da ga tako "prevarim", ali dobijem nesto sto citac ne moze da procita (imam i sample koji citac prepoznaje kao EAN128). Verovatno nesto propustam, molim za pomoc.

Hvala i pozdrav!
Nisam ni znao da znam dok nisam prob'o!
 
Odgovor na temu

Zidar
Canada

Moderator
Član broj: 15387
Poruke: 3085
*.100.46-69.q9.net.



+79 Profil

icon Re: BarCode: Code128 -> EAN12830.03.2009. u 22:13 - pre 183 meseci
128 = 128A jeste EAN128, tu ne bi trebalo da bude razlike. Nesto malo se razlikuje 128B.

Pogledaj ovu diskusiju, na vrhu je kod za 39, ali dole malo imas 128A.

http://www.tek-tips.com/viewthread.cfm?qid=986201&page=5

Odatle te upucuju na verovatno najbolje mesto ako hoces da se bavis barkodovima:

http://grandzebu.net/index.php...ormatique/codbar-en/codbar.htm

Evo kod za 128A:
Code:
Option Compare Database
Option Explicit

Option Explicit
' Written by Rodney Marr ([email protected]) October 7, 2000
' Modified to 128A by Mike Lightner 12 Apr 2004
' http://grandzebu.net/index.php...ormatique/codbar-en/codbar.htm
' Barcode 128-A Generator
'
' Permission granted for public use and royalty-free distribution.
' No mention of source or credits is required.
'
' I got a lot of help from the following people's work
' Russ Adams' BarCode 1 Web Page   http://www.adams1.com/pub/russadam/info.html
' A Free 128-B code generator in Visual Basic by Rodney Marr
' And the Creator of the code 39 Module
'
' TO USE THIS CODE:
'
'   1 - Create Report with a TextBox control. (example named Barcode)
'       Make sure the Visible property is set to "No".
'   2 - Set On-Print property of section to [Event Procedure]
'       by clicking on the [...] and selecting "Code Builder"
'   3 - Confirm that the following code matches yours...
'
'      Sub Detail1_Print (Cancel As Integer, PrintCount As Integer)
'
'         Result = SetBarDataA(Barcode, Me)
'
'      End Sub
'
'   4 - NOTE: The name of the section is "Detail1" for example only!
'       Your section might show a different name. Ditto for "Barcode".
'
'   5 - NOTE: To use on sub-forms, the Report name should be hard-coded
'       into the function. i.e. Rpt = Reports!MainForm!SubForm.Report.
'       The easy method is to just avoid using sub-forms and sub-reports.

Public Function SetBarDataA(Ctrl As Control, rpt As Report)
    
    On Error GoTo ErrorTrap_SetBarDataA
    
    'Code 128A has 5 main parts to it. The first part is a start character(211214), followed by DataCharcters. The Data
    'Characters are followed by a check(or Checksum) Character, and that is followed by a stop Character(2331112)
    'The last part of Code 128A is the two quiet sections at the front and back of the barcode. These are 10 dimensions
    'Long(I am thinking that is 11 modules long). Each character is 11 modules long, except the stop character which is
    '13 modules long
    
    Dim CharNumber As Variant, CharData As Variant, CharBarData As Variant, Nratio As Variant, Nbar As Variant
    Dim barcodestr As String, Barcode As String, Barchar As String, Barcolor As Long, Parts As Integer, J As Integer
    Dim tsum As Integer, lop As Integer, s As Integer, checksum As Integer, p As Integer, barwidth As Integer
    Dim boxh As Single, boxw As Single, boxx As Single, boxy As Single, Pix As Single, Nextbar As Single
    Const White = 16777215: Const Black = 0
    
    'This is the Raw data that I threw into an arrays
    CharNumber = Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16,", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29,", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "100", "101", "102", "103", "104", "105", "106")
    CharData = Array("SP", "!", Chr(34), "#", "$", "%", "&", "'", "(", ")", "*", "+", ",", "-", ".", "/", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ":", ";", "<", "=", ">", "?", "@", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "[", "\", "]", "^", "_", Chr(0), Chr(1), Chr(2), Chr(3), Chr(4), Chr(5), Chr(6), Chr(7), Chr(8), Chr(9), Chr(10), Chr(11), Chr(12), Chr(13), Chr(14), Chr(15), Chr(16), Chr(17), Chr(18), Chr(19), Chr(20), Chr(21), Chr(22), Chr(23), Chr(24), Chr(25), Chr(26), Chr(27), Chr(28), Chr(29), Chr(30), Chr(31), "FNC 3", "FNC 2", "SHIFT", "CODE C", "CODE B", "FNC 4", "FNC 1", "Start A", "Start B", "Start C", "Stop")
    CharBarData = Array("212222", "222122", "222221", "121223", "121322", "131222", "122213", "122312", "132212", "221213", "221312", "231212", "112232", "122132", "122231", "113222", "123122", "123221", "223211", "221132", "221231", "213212", "223112", "312131", "311222", "321122", "321221", "312212", "322112", "322211", "212123", "212321", "232121", "111323", "131123", "131321", "112313", "132113", "132311", "211313", "231113", "231311", "112133", "112331", "132131", "113123", "113321", "133121", "313121", "211331", "231131", "213113", "213311", "213131", "311123", "311321", "331121", "312113", "312311", "332111", "314111", "221411", "431111", "111224", "111422", "121124", "121421", "141122", "141221", "112214", "112412", "122114", "122411", "142112", "142211", "241211", "221114", "413111", "241112", "134111", "111242", "121142", "121241", "114212", "124112", "124211", "411212", "421112", "421211", "212141", _
                                          "214121", "412121", "111143", "111341", "131141", "114113", "114311", "411113", "411311", "113141", "114131", "311141", "411131", "211412", "211214", "211232", "2331112")
                                          
    barcodestr = "211412" 'Add the Startcode for Start A (characterset A) to the barcode string
    tsum = 103            'And this is the value for that startcode which will be added with the other character values to find the checksum character
    boxx = Ctrl.Left: boxy = Ctrl.TOP: boxw = Ctrl.Width: boxh = Ctrl.Height    'Get control size and location properties.
    
    
    Barcode = UCase(Ctrl) 'Set handle on control and change all lower case letters to uper case.

    Nratio = Array("0", "15", "30", "45", "60")           'Set up the array for the different bar width ratios
    Parts = ((11 * (Len(Barcode))) + 35) * Nratio(1)  'This is the formula for the width of the barcode
    Pix = (boxw / Parts)                                                  'Here I find out exactly how many Pixels a bar will be
    Nbar = Array((Nratio(0) * Pix), (Nratio(1) * Pix), (Nratio(2) * Pix), (Nratio(3) * Pix), (Nratio(4) * Pix)) 'Set up the array to handle the pixels for each type of bar
    
    'Loop through all bardata to count the sum for all characters and add barcode charcter strings the to the barcode string
    For lop = 1 To Len(Barcode)
        Barchar = Mid(Barcode, lop, 1)
        If Barchar = " " Then Barchar = "SP"
        For s = 0 To UBound(CharData)
            If Barchar = CharData(s) Then
                barcodestr = barcodestr & CharBarData(s) 'This is where I added the character strings to each other to make one long string of 1's, 2's, 3's, & 4's
                tsum = tsum + (CLng(CharNumber(s)) * lop) 'Here every barcode character's number value is multiplied by its position in the line and added to tsum
                'The actual formula for find the the  Checksum  is "(104 + (1 * CharcterNumber) + (2 * CharcterNumber) + ...)/103" You would Use the Remainder as
                'The Checksum Character. In the case of "BarCode 1" the formula would look
                'like "(104+(1*34)+(2*65)+(3*82)+(4*35)+(5*79)+(6*68)+(7*69)+(8*0)+(9*17))/103=20 with Remainder of 33" Therefore the checksum would equal 33
                Exit For
            End If
        Next s
    Next lop
        
    checksum = tsum - (Int(tsum / 103) * 103)                                             'Here I use the the totat sum (tsum) to find the checksum
    barcodestr = barcodestr & CharBarData(checksum) & "2331112" 'Here I add the checksum then the stop character into the barcode string
        
    'lets do some initialization
    Barcolor = Black
    Nextbar = boxx + 11     'I added the 20 for the whitespace (or quiet space) at the beginning of the barcode
    
    'Draw the Barcode
    For J = 1 To Len(barcodestr)
        Barchar = Mid(barcodestr, J, 1)   'Reuse variable barchar to store the character to be drawn
        barwidth = CInt(Barchar)              'Change the barcode charcter into an integer so I can use in the array part of the next line
        rpt.Line (Nextbar, boxy)-Step(Nbar(barwidth), boxh), Barcolor, BF  'Draw the line
        Nextbar = Nextbar + Nbar(barwidth)                                                      'Calculate the next starting point
        If Barcolor = White Then Barcolor = Black Else Barcolor = White      'Swap line colors
    Next J

Exit_SetBarDataA:
    Exit Function

ErrorTrap_SetBarDataA:
    MsgBox Error$
    Resume Exit_SetBarDataA

End Function


 
Odgovor na temu

Zidar
Canada

Moderator
Član broj: 15387
Poruke: 3085
*.100.46-69.q9.net.



+79 Profil

icon Re: BarCode: Code128 -> EAN12830.03.2009. u 22:29 - pre 183 meseci
Iz iskustva: jedna firma u kojoj sam radio slala je mnogo paketa, na hiljade i trebalo je da to pratimo u svom sistemu. Kurir koji je nosio pakete je bila kompanija Purolator. Na kanadskim trzisy=tu oni su najvce (Canad Post), veci nego FedeX ili UPS. DHL, koji radi i u Srbiji, ovde je skoro nepostojeci. Elem, Purolator nam je dozvolio da sami stampamo nalepnice za pakete. Dobili smo specifikaciju za nalepnicu, da bi njihovi uredjaji mogli da citaju. Po tome su nam naplacivali. Pogodi sta smo koristili - 128B.

Idi na Google i trazi ime Rodney Marr. Covek je ostavio besplatan slobodan Access kod za generisanje koda 128. U prethodnom postu sam ti dao linkove koji vode do nekog kop se zove Mike Lightner, taj je napisao 128 A, koji je kao modifikacija od 128(B). I naravno, za narodski kod 3 of 9 (39), Google 'James Isle Mercanti'

Ako nista ne pomogne imas kupovne opcije. Najjeftinija, a RADI jeste spanska firma koja pravi proizvod ABarcode. Nisu mnogo skupi, red velicine 50 eura za kao jednu licencu, a vise ti i ne treba, cak i ako radis nesto veoma veliko. I uvek mozes trosak da prevalis na klijenta. Ako bas cepaju dlaku, pa en moze 128 nego mora 128EAN, neka plate

 
Odgovor na temu

CandyMan

Član broj: 3420
Poruke: 147



+49 Profil

icon Re: BarCode: Code128 -> EAN12801.04.2009. u 15:10 - pre 183 meseci
Pozdrav Zidar,

Hvala na iscrpnom odgovoru, ali, been there, read it, done it....
Mene interesuje da li je neko ovde već radio sa GS1-128 (ili UCC kako mu je ranije bilo ime) tj. da li je formirao takav kod koristeći, na primer, vba koji si okačio.
Što se odluke tiče da li će se raditi sa A, B ili C kodom, ona zavisi od sadržaja. Ukoliko su znaci koje treba kodirati alfanumerički, sve osim 128B otpada, 128C se koristi ako se hoće kompaktniji kod, itd...

Gotova rešenja su svakako jeftina, ali nisu interesantna :)

Detalji o GS1-128 su na http://en.wikipedia.org/wiki/GS1-128 ali tamo ne piše ono što meni treba, ili ja ne čitam pažljivo :)
Nisam ni znao da znam dok nisam prob'o!
 
Odgovor na temu

CandyMan

Član broj: 3420
Poruke: 147



+49 Profil

icon Re: BarCode: Code128 -> EAN12802.04.2009. u 10:53 - pre 183 meseci
Evo i kratkog update-a: probao sam ABarcode i NE RADI!
Šta ne radi? Modul za Access ne generiše kod kada string pored brojeva sadrži i slova, bar ne ova trial verzija.
Nisam ni znao da znam dok nisam prob'o!
 
Odgovor na temu

abbylee
programmer
Software Company

Član broj: 327211
Poruke: 4
76.191.115.*



Profil

icon Re: BarCode: Code128 -> EAN12815.05.2015. u 08:22 - pre 108 meseci
Sie können auf diese beiden Quellen beziehen:
Code 128 generation guide
EAN 128 generation guide
Hoffe, es wird Ihnen helfen.
 
Odgovor na temu

_owl_

Član broj: 318
Poruke: 1043
*.static.isp.telekom.rs.



+3 Profil

icon Re: BarCode: Code128 -> EAN12815.05.2015. u 09:02 - pre 108 meseci
EAN-128 je barkod simbologija koja u sebi sadrži strukturirane podatke.
Više o EAN-128 pogledaj na: http://en.wikipedia.org/wiki/GS1-128
Obrati pažnju na upotrebu FCN1 i gde je neophodna (polja varijabilne dužine) a gde nije neophodna njegova upotreba.
Obično se FCN1 može simulirati kao znak ↔ (ASCII 29, na Windowsu ga možeš dobiti kao ALT+2+9).
Owl
 
Odgovor na temu

[es] :: Access :: BarCode: Code128 -> EAN128

[ Pregleda: 6224 | Odgovora: 6 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.