Barcode Fonts, Components, ActiveX and .NET Windows Forms Controls, Java Servlets, 
DLLs and Barcode Scanners., Inc., Computers Hardware, Software & Services, Tampa, FL View your cart in the IDAutomation Store    

Home > Font Encoders > Font Encoder for SSRS Tutorial

Create Code 128 Barcode in SSRS with Font FormulasSSRS Barcode Font Encoder

Crystal Support

Installation | Tutorial

How to Create Barcodes in SSRS using Barcode Fonts and Font Formulas

View Video Full Screen on YouTube

The files for the Native Generators are located in the "SSRS Font Encoder" folder of the developer licensed zip file. RDL files are also included as an example, which should be referred to if problems are encountered with implementation.

  1. This SSRS barcode report tutorial uses Code 128 from the Code 128 Font Advantage Package.
  2. Purchase and install the appropriate barcode fonts by running the setup EXE file provided in the font package.
  3. Open the custom code section of the report:
    • Visual Studio .NET Report Designer users: The font encoder can only be installed into existing reports. Refer to the Creating a Report tutorial, if there is not an existing report. Select File - New - Project. To activate the Report menu in the VS .NET IDE, click on the body of the report. Select Report - Report Properties - Code.
      Select Report - Report Properties - Code
    • Report builder users: Choose File - New - Report and open the report custom code. If the Report Properties dialog does not appear, click on the gray area of the report.
      Report custom code dialog
  4. The code area of the report should now appear:
    SSRS report custom code area
  5. Open the desired font encoder in a text editor, in this tutorial IDAutomation_SSRS_FontEncoder_Code128.txt is opened.
  6. Copy the contents of the file and Paste the code into the custom code area and choose OK. This places a custom function in the report that formats data to the barcode font. Save the report.
    The custom code area

  7. Add a Textbox where the barcode is needed or locate an existing text field and size it to be large enough to contain the barcode. If the Textbox is not large enough, the barcode will be very distorted or truncated. In order to produce the required quiet zone, or the space around the barcode, it is recommended to choose the paragraph center options.
    Centering and sizing the barcode field
  8. Right-click on the Textbox and select Expression. This is where the custom code is executed and the resulting barcode will be placed within the Textbox. In design mode, the expression will appear as «Expr» .
    The SSRS Expression
  9. Set the expression to include the barcode generation formula:
    replacing HeroID with the data field that needs to be encoded in the barcode and select needs to be encoded in the barcode and select OK. To obtain the formula for other barcode types, refer to the name of the associated .txt file. Refer to the Barcode Parameters section of this manual for information about encoding multiple fields, different barcode types and appending static text to dynamic data.
    Setting the value for the expression
  10. Select the Textbox and set the font to the appropriate barcode font and point size. The "IDAutomationC128XS" font is selected in this example at 12 points.
    Selecting the barcode font for the field. 
  11. Run the report and verify the barcode is generated properly.
    Barcode Parameters and other Information
    • Setting Barcode Properties: These may be set in the =code expression or in the custom code area. These parameters should only be set when necessary.
      • To set a parameter in the =code expression, place a comma after the field data and enter the value, for example:
      • To set a default parameter in the custom code area, open the report custom code and locate the "Public Function" statement and change the desired default value.
        Font encoder parameters
    • Data Type Conversions: If the data in the field (HeroID in this case) is not stored as text it will need to be converted into a string before encoding, for example: Fields!HeroID.Value().ToString()


Forum Support for Font Formulas for Crystal ReportsFree product support may be obtained by searching resolved Public Forum Threads. Priority phone, email and forum support is also provided up to 30 days after purchase. Additional priority phone, email and forum support may be obtained if the Level 2 Support and Upgrade Subscription is active. For assistance with other SSRS issues, refer to Microsoft Support for Business Site or the Microsoft SSRS TechNet Forum.

 ©Copyright 2019, All Rights Reserved. Legal Notices.

 Barcode Fonts | Components | Scanners | Support | Contact Us

Training Videos on YouTube  Join us on LinkedIn  Follow us on Twitter  Like us on Facebook
Over 70% of Fortune 100 companies use IDAutomation's products to automate their businesses.