Software Search, Categories and Specials
Ozgrid, Experts in Microsoft Excel Spreadsheets
Javascript DHTML Drop Down Menu Powered by dhtml-menu-builder.com

Active DataXL - Download

 

AnalyserXL - Download

 

DownloaderXL - Download

 

Smart VBA - Download

 

TraderXL - Download

Active Reports Barcode

 

Microsoft Excel - From Beginner to Expert in 6 Hours/ EXCEL DASHBOARD REPORTS

Code 128, PDF417, Data Matrix & MaxiCode INDEX

All purchases can be made via Id-Automations site

Special! Spend Over $100.00 any any barcodes, or barcode software & get our Complete Excel Training Course OR Ozgrid Add-ins Collection FREE! Or, spend Over $200.00 and get both! Send payment confirmation to [email protected] 31 Days After Purchase.

Active Reports Barcode - Code 128, PDF417, Data Matrix & MaxiCode INDEX

Below, we list 3 popular methods of including barcodes in ActiveReports.

Method 1 - using Self-Checking Fonts, MICR and OCR fonts

Self-Checking Barcode Fonts, MICR and OCR fonts are compatible with ActiveReports and may be used with ease. To use a self-checking font such as Code 39, you need to insert a "*" before and after the data encoded. Therefore, if you encode AR3OF9 in a barcode, you would need to display the text *AR3OF9* in a field with the Code 39 font selected. In this method, we describe an easy way to do this.

  1. First, you must install one of our Code 39 font packages. We recommend the Code 39 Font Advantage Package because this package includes several fonts in different heights.
  2. Start Visual Basic and open the ActiveReport to which you need to add the barcode.
  3. On the ActiveReport toolbox, choose the TextBox control and create a text box on your report that is large enough to include the barcode. Make a note of its name, in this case it is Field1.
  4. Double-click on a blank area in the report to show the report code.
  5. Add the following code to the report where Field1 is the name of the TextBox that will contain the barcode, NumberData is the field from the database you wish to include in the bar code and DAODataControl1 is the data control.
    Private Sub ActiveReport_FetchData(EOF As Boolean)
        If DAODataControl1.Recordset.EOF Then Exit Sub
        Field1.Text = "*" & DAODataControl1.Recordset("NumberData") & "*"
    End Sub
  6. Run the report to make sure the asterisk is appended to the beginning and end of the data that is retrieved from the data source.
  7. Go back and edit your ActiveReport. Change the font of the field to contain the barcode to one of our Code 39 barcode fonts and run the report again. You should now see the barcode.
  8. With Code 39, you can also easily add tabs between two fields in a single barcode (in extended39) for example:
      =("*"&[DataField1] & "$I" &[DataField2] & "*")

Method 2 - using our Visual Basic barcode font module with barcode fonts

Barcode fonts such as UPC, EAN, Code 128, Interleaved 2 of 5 and MSI require calculations to be performed to determine the check character. To assist our font users with this, we provide a Visual Basic project module. The functions of this module can also be used in an ActiveReport. In this example, we will add UPC/EAN-128 barcodes to a report. For a list of functions included in our module, refer to the function list at our VBA code site.

  1. First, you must install one of our font packages. If you are unsure of which to install, we recommend the Code 128 Font Advantage Package because this package includes several fonts in different heights and it encodes all letters and numbers.
  2. Start Visual Basic and open the ActiveReport to which you need to add the barcode.
  3. In Visual Basic, Choose Project - Add Module.
  4. Select the ID-AutomationVBA.bas file.
  5. ox, choose the TextBox control and create a text box on your report that is large enough to include the barcode. In this example, we are going to include formatted "Human Readable" text below the barcode as required for UCC/EAN-128 specifications. If you wish to add "Human Readable" text, add another field and place it on the form. Make a note of the field names, in this case they are Field1 and Field2.
  6. Double-click on a blank area in the report to show the report code.
  7. Add the following code to the report where Code128() is the function, Field1 is the name of the TextBox that will contain the barcode, NumberData is the field from the database you wish to include in the bar code and DAODataControl1 is the data control. For a list of functions included in our module, refer to the function list at our VBA code site.
    Private Sub ActiveReport_FetchData(EOF As Boolean)
        If DAODataControl1.Recordset.EOF Then Exit Sub
        Field1.Text = Code128(DAODataControl1.Recordset("ucc128"), 0)
        Field2.Text = Code128(DAODataControl1.Recordset("ucc128"), 1)
    End Sub
  8. Run the report to make sure the data is being pulled from the fields and properly formatted to the barcode font. You should see that some strange characters have been appended to the beginning and ending of the data from the fields - this is normal. Sometimes the data has to be formatted so much it appears to be scrambled. This is normal for Code 128 and Interleaved 2 of 5 when numbers need to be compressed within the barcode. In the graphic below, the first string is produced by the Code128(DAODataControl1.Recordset("ucc128"), 0) formula and the second one is produced by the Code128(DAODataControl1.Recordset("ucc128"), 1) formula.
  9. Go back and edit your ActiveReport. Change the font of the field to contain the barcode to the appropriate barcode font. In this case, we selected the ID-AutomationC128M font to create a Code-128 barcode.
  10. Now, when the report is run we see the barcode created in the field1 text box.
  11. You may include multiple fields in a single barcode by changing the field formula. For example, to include two fields (sscc18 and ucc128) in a single code 128 barcode with a tab function between them we use the following formula:
    Field1.Text = Code128(DAODataControl1.Recordset("sscc18") & Chr(9) & DAODataControl1.Recordset("ucc128"), 0)
    You may use Chr(9) for a tab and Chr(13) for a return.

Method 3 - using the ActiveX Control and DLL with Active Reports

Our ActiveX Control and DLL products may be easily used in ActiveReports. We have linear symbologies available as well as 2D barcodes such as PDF417, Data Matrix and Maxicode. In the example below, we will include a code 128 barcode in a report. Our ActiveX Control is very useful in ActiveReports because the control automatically formats "Human Readable" data for AIs in UCC128 and EAN128 barcode types.

  1. First, you need to install one of our ActiveX Control products.
  2. Start Visual Basic and open the ActiveReport to which you need to add the barcode.
  3. On the ActiveReport toolbox, choose the more controls button
    Then, select the barcode control from the list of available ActiveX Controls (it begins with ID-Automation). After selecting it, the control will appear in the report. You may size the control as necessary.
  4. To change the properties of the control such as barcode height and symbology type, select the control and choose View - Properties Window.
  5. To connect the barcode control directly to a single data field from your data source, select or enter the DataField property from the property window.
  6. To include multiple fields in the same barcode:
    1. In this example, we include two fields (sscc18 and ucc128) in a single code 128 barcode with a tab function between them. When scanned, the scanner will read the tab function which will advance the cursor to another field. The is very useful when you need to populate multiple fields from the scanned data. Usually, PDF417 or DataMatrix is used in this situation because these barcode types can encode hundreds of characters in a single symbol. You can only encode functions between fields in Code 39, Code 128, PDF417, Data Matrix and Maxicode symbologies.
    2. Make sure the control is not bound to a data field - the DataField property in the property window should be blank.
    3. Double-click on a blank area in the report to show the report code.
    4. Add the following code to the report where "sscc18" and "ucc128" are fields you wish to include in the bar code and DAODataControl1 is the data control.
      Private Sub ActiveReport_FetchData(EOF As Boolean)
          If DAODataControl1.Recordset.EOF Then Exit Sub
          BarCode1.DataToEncode = DAODataControl1.Recordset("sscc18") & Chr(9) & DAODataControl1.Recordset("ucc128")
      End Sub
    5. You may use Chr(9) for a tab and Chr(13) for a return.
  7. When the report is run, the barcode will be created.

All purchases can be made via Id-Automations site

Special! Spend Over $100.00 any any barcodes, or barcode software & get our Complete Excel Training Course OR Ozgrid Add-ins Collection FREE! Or, spend Over $200.00 and get both! Send payment confirmation to [email protected] 31 Days After Purchase. All purchases can be made via Id-Automations site



Instant Download and Money Back Guarantee on Most Software

Microsoft Excel - From Beginner to Expert in 6 Hours/ EXCEL DASHBOARD REPORTS

Excel Trader Package Technical Analysis in Excel With $139.00 of FREE software!

Microsoft and Microsoft Excel are registered trademarks of Microsoft Corporation. OzGrid is in no way associated with Microsoft

GIVE YOURSELF OR YOUR COMPANY 24/7 MICROSOFT EXCEL SUPPORT & QUESTIONS