Crystal Reports Barcode Generator
Generate, encode, print barcode label in Crystal Reports for .NET. No font encoder. Free demo download.
How to generate, embed, printing linear, 2d barcode label Crystal Reports report viewer in asp.net mvc web project without using font. Free download. No working problem.
- Advanced barcode generator control to display high-quality barcodes in Crystal Reports
- Totally integrated with .NET framework 2.0, 3.0, 3.5 and above versions
- Compatible with latest corresponding barcode specifications or standards
- Easy to use, simple to install for .NET Crystal Reports barcode generation and creation
- User-friendly tutorial & interface to make adjustments for the generated barcode images on Crystal Reports
- Support generating barcodes in various image formats including Png, Gif, Jpg, Bmp & Tiff
- Resolution adjustable to print accustomed barcode pictures suitable for all printers
Download KA.Barcode for Crystal Reports Time Limitation
You can use this free trial version of KA.Barcode for Crystal Reports infinitely. Limits of Evaluation
Linear and 2D barcode images generated with this free trial version of KA.Barcode for Crystal Reports will contain a "KA Barcode" watermark. Therefore, they cannot be used for commercial applications. Only demo/evaluation implementation is allowed. Please purchase a provided license for other applications. Generate Barcode in Crystal Reports for Web Forms Project
- Create a new web project with "ASP.NET Crystal Reports Web Site" as template in Visual Studio.
- 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" and 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".
- Copy the sample code accordingly and run the project.
C# Sample code
protected void Page_Load(object sender, EventArgs e) { { //create the database connection. Please change to correct data file (BarcodeDemoData.mdb) path. OleDbConnection aConnection = new OleDbConnection ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:/KACrystalData.mdb "); aConnection.Open(); OleDbDataAdapter dataAdapter = new OleDbDataAdapter("select * from Product", aConnection); DataSet ds = new DataSet(); dataAdapter.Fill(ds); //Add the Barcode column to the DataSet ds.Tables[0].Columns.Add(new DataColumn("Barcode", typeof(byte[]))); //Create an instance of Linear Barcode //Use DataMatrixCrystal for Data Matrix //Use PDF417Crystal for PDF417 //Use QRCodeCrystal for QR Code BarCode barcode = new BarCode(); //Barcode settings barcode.Symbology=KeepAutomation.Barcode.Symbology.Code128Auto; barcode.ImageFormat = System.Drawing.Imaging.ImageFormat.Png; foreach (DataRow dr in ds.Tables[0].Rows) { barcode.CodeToEncode = (int)dr["ProductId"] + ""; byte[] imageData = barcode.generateBarcodeToByteArray(); dr["Barcode"] = imageData; } CrystalReportSource1.ReportDocument.Load(Server.MapPath("CrystalReport1.rpt")); CrystalReportSource1.ReportDocument.SetDataSource(ds.Tables[0]); CrystalReportSource1.DataBind();
}
} } VB Sample code
'create the database connection. Please change to correct data file (BarcodeDemoData.mdb) path. 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.Code128Auto 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
CrystalReportSource1.ReportDocument.Load(Server.MapPath("CrystalReport1.rpt")) CrystalReportSource1.ReportDocument.SetDataSource(ds.Tables(0)) CrystalReportSource1.DataBind() Generate Barcode in Crystal Reports for WinForms Project
- Create a new .NET project with "Crystal Reports Application" as template.
- Create a new report "Using the Report Wizard", choose "Standard", and click "OK" button.
- In "Data" form, expand "Create New Connection", and expand "ADO.NET".
- In "Connection" form, select the "ProcudtDataSet.xsd" in your downloaded sample dataset package. Then click "Finish" button.
- In "Data" form, add table "Customer" and click "Next". In "Fields" form, add all three columns in the table "Product", and click "Finish".
- In CrystalReport1.rpt, drag and drop "Barcode" in "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", and copy the following code into the method Form1_Load and run the report.
C# Sample code
OleDbConnection aConnection = new OleDbConnection ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source = C:/KACrystalData.mdb"); aConnection.Open(); OleDbDataAdapter dataAdapter = new OleDbDataAdapter("select * from Product", aConnection); DataSet ds = 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", typeof(byte[]))); BarCode barcode = new BarCode(); barcode.Symbology=KeepAutomation.Barcode.Symbology.Code39; barcode.ImageFormat=System.Drawing.Imaging.ImageFormat.Png;
foreach (DataRow dr in ds.Tables[0].Rows) { barcode.CodeToEncode = (int)dr["ProductId"] + ""; byte[] imageData = barcode.generateBarcodeToByteArray(); dr["Barcode"] = imageData;
}
CrystalReport1 rpt = new CrystalReport1(); rpt.SetDataSource(ds); this.crystalReportViewer1.ReportSource = rpt; aConnection.Close();
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 KeepAutomation.Barcode.Crystal.BarCode() barcode.Symbology = KeepAutomation.Barcode.Symbology.Code39 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 Dim rpt As New CrystalReport1() rpt.SetDataSource(ds) Me.CrystalReportViewer1.ReportSource = rpt aConnection.Close() |
Download Free Trial In Web Crystal ReportsIn Windows CrystalHow 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
|