Crystal Reports Barcode Generator
Generate, print, show barcode label in Crystal Reports using vb.net. No font formula, ufl. Free download with demo code.
How to generate, show, display, print linear, 2d barcode labels in Crystal Reports report viewer using vb.net without font, ufl, formula. Free download.
Introduction of KA.Barcode for Crystal Reports
KeepAutomation Crystal Reports Barcode Generator free demo is a reliable barcode component sdk that can be used in .NET language environment (such as C# & VB.NET programming) to generate standard barcodes in Crystal Reports automatically.
KeepAutomation provides free tutorial for developers to create barcode images. This barcode generator control library is compatible with multiple widely-used windows systems. It's simple to use this freeware trial version to abstract large numbers of barcode pictures. Compatibility & Requirements
- Development Environments: Visual Studio 2005 or above versions, Visual C#, Visual Basic.NET, Crystal Reports for .NET (runtime), .NET Framework 2.0, or greater
- Operating System Compatibility: Windows Vista / Windows7 / Windows XP / Window Server 2005 / 2008
- Microsoft Windows XP
- Microsoft Visual Studio 2005
- Visual Basic .NET
Generate Barcodes in Crystal Reports in WinForms Using VB
Evaluation Package Overview
Download Demo Package of KeepAutomation Barcode Generator for Crystal Reports and unzip. It is allowed to completely implement or display functions of barcode images in document for various applications, including transaction, medicine & console applications. With this barcode generator library, implementers may import characters into project for barcode generation.
This demo package is always used to capture graphics barcode images using VB code. It is also used to resize barcode images through height, length, human-readable text, etc.
Display the demo dataset "KACrystalData.mdb" from the unzipped evaluation package, you will find a table named "Product" with three columns inside: "ID", "ProductId", "ProductName".
There is a CustomerDataSet.xsd file for "KACrystalData.mdb" that is used to define the above three columns in "Product" table as well as an extra column named "Barcode".
Use VB.NET Class to Generate Barcodes for Crystal Reports in WinForms
- Create a new .NET project with "Crystal Reports Application" as template. Name the project as "CrystalReportsBarcode".
- Using the Report Wizard to create a new report, and choose "Standard", and click "OK" button.
- Expand "Create New Connection", find "ADO.NET" in "Data" form and expand it.
- In "Connection" form, select the "ProductDataSet.xsd" in your unzipped package. Then click "Finish" button.
- In "Data" form, add table "Product" and click "Next".
- In "Fields" form, add all three columns in the table "Product". Click "Finish".
- In CrystalReport1.rpt, drag and drop "Barcode" in the "Field Explorer" to the report Section 3.
- In .NET project "solution explorer", add "KeepAutomation.Barcode.Crystal.dll" to your project reference.
- Open your "Form1.cs", copy the following demo code and run the report.
VB Sample code
Dim aConnection As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:/KACrystalData.mdb") aConnection.Open()
Dim dataAdapter As New OleDbDataAdapter("select * from Product", aConnection) Dim ds As New DataSet() dataAdapter.Fill(ds)
'Add the Barcode column to the DataSet ds.Tables(0).Columns.Add(New DataColumn("Barcode", GetType(Byte())))
'Create an instance of Linear Barcode 'Use DataMatrixCrystal for Data Matrix 'Use PDF417Crystal for PDF417 'Use QRCodeCrystal for QR Code Dim barcode As New BarCode() 'Barcode settings barcode.Symbology = KeepAutomation.Barcode.Symbology.UPCA barcode.ImageFormat = System.Drawing.Imaging.ImageFormat.Png
For Each dr As DataRow In ds.Tables(0).Rows barcode.CodeToEncode = CInt(dr("ProductId")) & "" Dim imageData As Byte() = barcode.generateBarcodeToByteArray() dr("Barcode") = imageData Next CrystalReportSource1.ReportDocument.Load(Server.MapPath("CrystalReport1.rpt")) CrystalReportSource1.ReportDocument.SetDataSource(ds.Tables(0)) CrystalReportSource1.DataBind() Generate Barcodes in Crystal Reports in Web Forms Using VB
- Open your Visual Studio, create a new web project with "ASP.NET Crystal Reports Web Site" as template;
- Create a new report "Using the Report Wizard", choose "Standard", and click "OK";
- In "Data" form, double click "Create New Connection", and expand "ADO.NET".
- In "ADO.NET" form, select "ProductDataSet.xsd" file in your downloaded package, and click "Finish" button.
- In "Data" form, add table "Product" and click "Next".
- In "Fields" form, add all three columns in the table "Product". Click "Finish".
- In CrystalReport1.rpt, add field "Barcode" to the report Section 3;
- Add "KeepAutomation.Barcode.Crystal.dll" to your project reference in "Solution Explorer";
- Right click "Default.aspx" in"Solution Explorer" and choose "View Code";
- Use the following demo code accordingly and run the project.
VB Sample code
Dim aConnection As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:/KACrystalData.mdb") aConnection.Open() Dim dataAdapter As New OleDbDataAdapter("select * from Product", aConnection) Dim ds As New DataSet() dataAdapter.Fill(ds) 'add a new column named "Barcode" to the DataSet, the new column data type is byte[] ds.Tables(0).Columns.Add(New DataColumn("Barcode", GetType(Byte()))) Dim barcode As New BarCode() barcode.Symbology = KeepAutomation.Barcode.Symbology.EAN13 For Each dr As DataRow In ds.Tables(0).Rows barcode.CodeToEncode = CInt(dr("ProductId")) & "" Dim imageData As Byte() = barcode.generateBarcodeToByteArray() dr("Barcode") = imageData Next Dim rpt As New CrystalReport1() rpt.SetDataSource(ds) Me.crystalReportViewer1.ReportSource = rpt aConnection.Close() |
CompatibilityTest EnvironmentFor Windows VBFor Web VBHow To Start Using C#Using VB.NETUsing ASP.NETUsing .NET WinformsData Matrix for Crystal ReportPDF417 for Crystal ReportQR Code for Crystal ReportmoreCodabar for Crystal ReportCode 39 for Crystal ReportCode 128 for Crystal ReportEAN-8 for Crystal ReportEAN-13 for Crystal ReportEAN 128 for Crystal ReportIntelligent Mail for Crystal ReportInterleaved 2 of 5 for Crystal ReportISBN for Crystal ReportITF-14 for Crystal ReportRM4SCC for Crystal ReportUPC-A for Crystal ReportUPC-E for Crystal Reportmore
|