Home:  Products:  Font Tools:  Microsoft® Reporting Services:

Custom Assembly for Microsoft® Reporting Services Microsoft® Reporting Services Barcode DLL Custom Assembly
for SQL Server 2000 and Visual Studio 2003

Reporting Services is a Microsoft reporting solution for SQL Server 2000 and Visual Studio 2003. This custom assembly formats the data specifically for use with our barcode fonts, and to meet the specifications of the symbology laid out by the AIM and/or ANSI standards. This tutorial will show how to include the IDAutomation.com custom assemblies in a Reporting Services project. This example will show how to build a report based on the Customers table of the Northwind database. The report will include the database fields of CompanyName, CompanyID, and ContactName. We will add a custom field to the report, which will be used to provide a Code 128 barcode representation of the Company ID.

To use this tutorial, the following requirements must to be met:

Use of this font tool requires the purchase of at least 1 Developer License of one of our font packages.

Purchase Barcode Fonts | Function List | Technical Support

 Microsoft® Reporting Services Barcode Tutorial
  1. Install the appropriate barcode fonts on your system. If you are unsure which type barcode you need, we recommend the Code 128 Font Advantage Package because this barcode can encode numbers and letters, plus it is very compact. This example uses Code 128. We also have a Complete TrueType Font package that includes all linear barcode fonts.
  2. Download our Microsoft® Reporting Services Custom Assembly. The assembly, IDAutomation.com.FontReportFunctions.dll, will be in the zip file. 
    Unzip the file to an easy-to-remember location. 
    Copy the custom assembly dll to the Report Designer folder. The default location of the Report Designer is C:\Program Files\Microsoft SQL Server\80\Tools\Report Designer
    The assembly also needs to be copied to the Report Server directory so that it is available for deployment. The default location of that directory is C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer\bin.
  3. If adding the custom assembly to an existing report, skip to Step 13.
    Create a report: Select File | New | Project from the Visual Studio .NET (VS.NET) IDE menu. 
    In the New Project dialog, highlight Business Intelligence Projects in the Project Types box and Report Project Wizard in the Templates box. 
    Name your sample report appropriately in the Name box.  Click OK.
    Select Project Type in the Visual Studio.NET IDE menu.
  4. Select your data source. For this example, we are referencing the Northwind database. 
    Ensure that you Edit your connection string to properly connect to the database. Click Next.
    Select the corresponding Data Source with the Report Wizard in Microsoft Reporting Services.
  5. Create the query string for generating the report by using the Query Builder
    Add the Customer table to the query by right-clicking the upper pane in the query builder and selecting Add Table
    Highlight Customers and click Add and Close. 
    Drag the CustomerID, CompanyName, and ContactName fields into the query. Click OK. 
    Using Query Builder in MS Reporting Services to select the corresponding tables.
  6. Click Next on the Design Query Wizard.
  7. Choose the type of report (tabular or Matrix) to create and click Next.
  8. Leave the default values for the grouping of the report and click Next.
  9. Select the style of the table and click Next.
  10. Select your Report Server (You'll want to leave the default value. This was setup during Report Services installation) and the folder for the deployment of the compiled report. Click Next
  11. Name the report Barcode Company ID and click Finish. The report will now be in Layout mode. You may run the report to get an idea of how the output will be displayed. The following steps will add the encoded data field to the report.
  12. Right click the last column in the table. 
    Select Insert Column to the right. 
    Label the column Barcode ID by typing directly into the column header.
    Inserting a Barcode ID column into Microsoft Reporting Services.
  13. Click on the body of the report. This will activate the Report menu in the VS .NET IDE. 
    Click the Report Menu | Report Properties
    Click the References tab. At this point we will be adding IDAutomation.com.FontReportFunctions.dll to the report project.
  14. Click the button containing three dots next to the Assembly column.
  15. Click the Browse button on the Add Reference dialog box.
    Navigate to the location of IDAutomation.com.FontReportFunctions.dll. Select the file and click Open.
    Click OK on the Add Reference Dialog.
  16. At this point, we will select the class name containing the data encoding functions. This value is pulled directly from the assembly file. Also, an instance name is required. The values for these fields may be pulled directly from the image below:
    Assembly Name for IDAutomation.com Font Report Functions.
  17. Click OK. The encoding functions are now available for use in the report. For the purposes of this example, we will use the Code128 function. A complete list of available functions are listed below.
  18. The encoding functions are added as expressions to the appropriate field. Right click the empty area below the Barcode ID field and select Expressions.

    Please note
    : There is not a graphical means to enter these functions, you must type the information into the Expression: area of the Edit Expression dialog.  The format of the expressions is:
    =Code.InstanceName.FunctionName(parameter) where Code is a global module for processing custom code requests, InstanceName is the instance of the class variable assigned in step 16, FunctionName is one of the functions listed below, and the parameter is the data that needs to barcoded.

    Enter =Code.clsIDAutomationBarcode.Code128(Fields!CustomerID.Value) in the expression field.
    MS Reporting Services Expression needed to create barcode.
  19. Click the Preview tab to ensure that the function is returning data. 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.
    Preview of formatted data being displayed in Microsoft Reporting Services.
  20. Click the layout tab and apply one of the IDAutomation.com Code128 fonts to the field containing the expression. You can now preview the report.
    Preview of barcode being displayed in Microsoft Reporting Services.
  21. If you wish to deploy the solution to your Report Server, click Build | Deploy Solution.
 Barcode Function List:

For all functions below, the data input type is a single string. For all number symbologies such as POSTNET and UPC, you may input dashes or spaces for easier readability and they will be filtered out by the function before the barcode is generated. For UPC-A, UPC-E & EAN-13 you can enter the +2 and +5 add-on codes by just adding them to the end of the string. 
Function Notes
Code128(Data) This is a "Code 128 Auto" function that will automatically encode any data from ASCII 0 to ASCII 127. It will automatically switch to character set C for numbers. This symbology has many options:

UCC/EAN-128 Encoding: to encode alpha-numeric UCC/EAN128, the character set must be "0" or "AUTO" for automatic (the default setting). ASCII 202 or character Ê is recognized as the FNC1 before each AI. When a barcode begins with an AI, the required start C is included automatically. For example, the UCC number of (8100)712345(21)12WH5678 should be entered as: Ê8100712345Ê2112WH5678. In most cases, the AIs will be properly represented in the human readable text. If the parenthesis is not around the correct number for the AI, enter the following extended ASCII character as the FNC1 for the correct number of digits in your AI:
ASCII 212 = 2 digits        ASCII 213 = 3 digits
ASCII 214 = 4 digits        ASCII 215 = 5 digits
ASCII 216 = 6 digits        ASCII 217 = 7 digits
For example, to encode (1277)56, enter Ö127756.

Process Tilde Options: when the symbology is Code 128, the character set is AUTO and ApplyTilde is TRUE, the following options are available:

  • Encode ASCII characters: the format ~ddd may be used to specify the ASCII code of the character to be encoded. For example, if you enter the following text in the Data field: 128~029TEST you will actually be encoding 128GSTEST Where GS is a delimiter ASCII 29 character. Other commonly used ASCII codes are ~032 the space, ~202 the FNC1, ~197 the FNC2, ~009 the tab and ~013 which is a return function. For encoding other functions, please refer to our ASCII chart.
  • Create a Mod 10 Check digit: to create a Mod 10 check digit for xx number of characters add the following to the DataToEncode: ~mnn (where nn is a 2 digit number representing the number of characters preceding the tilde in which to base the Mod 10 calculation). The additional MOD 10 check digit is commonly used in UCC or EAN barcode types. For example, setting the DataToEncode property to Ê4021234567890123456~m16, will cause a mod 10 check digit to be created based on all 16 characters before the tilde. The human readable text and scanned data will display as (402)12345678901234566. The final 6 is the mod 10 check digit and replaces ~m16.

Review the Code 128 Data Sheet and FAQ for more information on this barcode type.

Code128a(Data) Use the characters from set B to print characters not on the keyboard; the scanner will scan characters from set A. Formats output to the Code 128 barcode fonts.
Code128b(Data) Returns codes formatted to the Code 128 character set B. Formats output to the Code 128 barcode fonts.
Code128c(Data) This code128 function "interleaves" numbers into pairs for high density. An even number of digits is required
I2of5() This function "interleaves" numbers into pairs for high density without check digits and formats the return string to the Interleaved 2 of 5 font. An even number of digits is required.
I2of5Mod10(Data, Number) (Data, 0) performs the mod10 checksum calculation for increased accuracy and formats the return string to the Interleaved 2 of 5 font. MOD 10 checksums are required for SSC-14 when using Interleaved 2 of 5 for that purpose. An odd  number of digits is required.
(Data, 1) returns the human readable data with the MOD10 check digit included.
(Data, 2) returns the MOD10 check digit.
Code39() Formats the output to print using Code 39 fonts.
Code39Mod43(Data, Number) (Data, 0) performs the mod43 checksum calculation for increased accuracy and then formats the output to print using Code 39 fonts. The mod43 checksum is usually required for LOGMARS applications.
(Data, 1) returns the human readable data with the check digit included.
(Data, 2) returns only the check digit.
Codabar() Formats the output to print using Codabar fonts.
Postnet(Data, Number) Enter a single string of Zip, Zip + 4 or Zip + 4 + Delivery Point. The input for Data must be a number and can include dashes and spaces.
(Data, 0) formats output to the POSTNET barcode fonts.
(Data, 1) returns the human readable data with the check digit included.
(Data, 2) returns only the check digit.
MSI(Data, Number) (Data, 0) formats output to the MSI barcode fonts.
(Data, 1) returns the human readable data with the check digit included.
(Data, 2) returns only the check digit.
Code11() Only the "C" check digit is calculated which is the standard when encoding 10 digits or less.
UPCa(Data) Data is a UPC-A number string of 11, 12, 13, 14, 16 or 17 digits with or without a check digit, add-ons are supported.  Formats output to the UPC/EAN barcode font. Entering incorrect data will create a barcode containing all zeros.
UPCe(Data) Data is a UPC-A number string of 11, 12, 13, 14, 16 or 17 digits with or without a check digit, add-ons are supported. The purpose of this function is to print the UPC-E barcode from a UPC-A barcode that can be compressed. It will print a UPC-A if it cannot be compressed by zero suppression rules. Formats output to the UPC/EAN barcode font. Entering incorrect data will create a barcode containing "00005000000".
EAN13(Data) Data is a number string of 12, 13, 14, 15, 17 or 18 digits with or without a check digit, add-ons are supported. Formats output to the UPC/EAN barcode font. Entering incorrect data will create a barcode containing all zeros.
mod10(Data) Data is a number string. A MOD 10 check digit is returned. This is useful in calculating check digits for UCC/EAN 128 barcodes where a MOD check digit is needed.
EAN8(Data) Data is a number string of 7 or 8 characters (EAN-8 without the check digit). Formats output to the UPC/EAN barcode font. Entering incorrect data will create a barcode containing all zeros.

View our product index to obtain a list of all products we offer.

Report Software Piracy! If you have any knowledge of our products that are being used in violation of our license agreement, copyright laws or international treaties, please report it. You can remain anonymous.


Reviews and Listings for custom assembly:

 
 Product Links: [Barcode Fonts | Barcode Components | Barcode Label Software | Barcode Scanners]

To sign up for monthly updates about new products or upgrades, please click here.Copyright © 2000-2005 IDAutomation.com, Inc. IDAutomation and BizFonts are registered trademarks of IDAutomation.com, Inc. All other trademarks mentioned are the property of their respective owners. 
 

Over 70% of Fortune 100 companies use our products to automate their businesses.