How to Add barcode images like QR Code in Native Crystal Reports using C#.NET?

19 Oct

It is possible to insert QR Code bar code images in Native Crystal Reports using Visual C# Class Library. .NET developers are able to integrate .NET applications like ASP.NET web application and Windows Forms applications with  Crystal Reports. You could insert bar code images into report solution using Visual Studio 2005 and 2010. QR Code barcode properties includes barcode height, width, X-dimension, , margins etc could be modified using C# programming.
Follow the steps to generate barcodes in Crystal Report using C# Class library:
  1. Download Aspper.Barcode.CrystalReports free trial package and unzip it on your computer.
  2. Start Visual Studio and create a Crystal Reports project using C#.
  3. In Crystal Report Gallery dialog box, choose the defaults of “Use Report Expert” and “Standard Report”.
  4. Expand “Create New Connection” and choose “ADO.NET” in Data form and click “next”.
  5. In the “Connection” form, select the “CustomerDataSet.xsd” in the downloaded package, and then click “Finish”.
  6. Add a  “Customer” table in the “Data” form, and then click “Next”.
  7. Add all three columns to the right “Customer” fields, Click “Finish” button.
  8. In CrystalReport1.rpt, drag and drop field “Barcode” to the report you created.
  9. Go to .NET project solution explorer, and then choose “Aspper.Barcode.CrystalReports Barcode.dll” and add it to the project reference.
  10. Then add “Aspper.Barcode.CrystalReports.dll” to your Crystal Reports project reference;
  11. Right click “Default.aspx” in “Solution Explorer” and choose “View Code” to enter the code form.

Now you are able to modify barcode properties according to specific requirements.  It is possible to maintain bar code images on files when you exporting them to PDF, Word, Excel and Power point formats.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: