---
title: "How to pass qr image from picture box to RDLC report"  
description: "How to pass qr image from picture box to RDLC report"  
author: "Abeer Shlby"  
published: 2017-01-19  
updated: 2017-01-22  
canonical: https://www.mindstick.com/forum/34244/how-to-pass-qr-image-from-picture-box-to-rdlc-report  
category: "c#"  
tags: ["c#", ".net", "reporting"]  
reading_time: 2 minutes  

---

# How to pass qr image from picture box to RDLC report

I work in c# [windows](https://www.mindstick.com/articles/311752/how-to-install-and-use-the-google-wifi-software-on-a-windows-or-mac-computer) form in [visual studio](https://www.mindstick.com/articles/12378/visual-studio-for-mac-is-out-of-beta-preview-now-officially-available) 2015 but i face [problem](https://yourviews.mindstick.com/view/81399/tackling-the-problem-of-unemployment-during-corona-pandemic) how to pass [picture box](https://www.mindstick.com/forum/23034/picture-box-with-3-partitions-and-partitions-should-be-controlled-with-numeric-updown) qr image to report RDLC directly without using [database](https://www.mindstick.com/articles/12226/use-of-database-in-sencha-extjs-and-insert-record-from-user-form-using-ajax) or sql meaning i need to show [qr code](https://www.mindstick.com/blog/304218/the-rise-of-qr-code-phishing-attacks) image in [report viewer](https://www.mindstick.com/forum/406/how-to-view-reports-in-c-sharp-using-microsoft-report-viewer) [rdlc report](https://www.mindstick.com/articles/23249/rdlc-report-in-mvc-application)

## Replies

### Reply by Anonymous User

Step 1. Download ( BarcodeLib.Barcode.RDLCReports.dll). Click here for Download BarcodeLib.Barcode.RDLCReports.dll\
\
after download add reference in your windows application.

### Reply by Anonymous User

i am going to explain print QR code in rdlc report. below i am print two type bar code first using database table and second using parameter in a single image.\

```

```

after inserting a image go to image properties set highlighted setting.

```

```

Now write below code.\

```
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.OleDb;
using System.Drawing.Imaging;
using BarcodeLib.Barcode.RDLCReports;
using BarcodeLib.Barcode;
using Microsoft.Reporting.WinForms;

namespace QRCode
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

            Merchant proc = new Merchant();
            var data = proc.GetProducts();

            LinearRDLC barcode = new LinearRDLC();
            barcode.Type = BarcodeType.CODE128;
            barcode.Data = "M I N D S T I C K S O F T W A R E";
            byte[] Bytes = barcode.drawBarcodeAsBytes();
            ReportParameter[] parameters = new ReportParameter[1];
            string sIMGBASE64 = Convert.ToBase64String(Bytes);
            parameters[0] = new ReportParameter("QRCODE", sIMGBASE64);

            reportViewer1.LocalReport.ReportPath = @"D:\OldSystemfiles\Aditya-Extra-Work\QRCode\QRCode\Report1.rdlc";
            ReportDataSource rds = new ReportDataSource("DataSet1", data);
            this.reportViewer1.LocalReport.DataSources.Add(rds);
            this.reportViewer1.LocalReport.SetParameters(parameters);
            this.reportViewer1.RefreshReport();
        }
    }

    public class SampleClass
    {
        private string m_description;
        private int m_price;
        private byte[] m_bytes;

        public SampleClass(string description, int price, string data)
        {
            m_description = description;
            m_price = price;
            LinearRDLC barcode = new LinearRDLC();
            barcode.Type = BarcodeType.CODE128;
            barcode.Data = data;
            m_bytes = barcode.drawBarcodeAsBytes();
        }

        public byte[] Bytes
        {
            get { return m_bytes; }
        }

        public string Description
        {
            get
            {
                return m_description;
            }
        }

        public int Price
        {
            get
            {
                return m_price;
            }
        }
    }

    public class Merchant
    {
        private List<SampleClass> m_products;

        public Merchant()
        {
            m_products = new List<SampleClass>();
            m_products.Add(new SampleClass("code128", 25, "code128"));
            m_products.Add(new SampleClass("code39", 30, "code39"));
            m_products.Add(new SampleClass("qrcode", 15, "qrcode"));
        }

        public List<SampleClass> GetProducts()
        {
            return m_products;
        }
    }
}
```

this is Result .

```

```

I hope this will help for you.Thanks.\
\
\


---

Original Source: https://www.mindstick.com/forum/34244/how-to-pass-qr-image-from-picture-box-to-rdlc-report

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
