ahmed salah

ahmed salah

  • NA
  • 530
  • 149.9k

How to display image from access database 2007 although all

Mar 8 2017 5:13 PM

How to display image from access database 2007 to rdlc although all data display in rdlc

I have problem in display image from access 2007 database to rdlc

i work in windows form c# vs2015

Actually i need to display image from database to more records from access 2007

but i cannot

in rdlc i do as following :

In RDLC

drag image control to
report source database
mime type jpeg
set EnableExternalImages = true
=First(Fields!qrimg.Value, "DataSetImage") for value
Name as Name of column in dataset .

In dataset

qrimg system.Byte[]

on interface

in button click view report
 
 
  1. reportViewer1.LocalReport.EnableExternalImages = true;  
  2.            QrClasses q = new QrClasses();  
  3.                DataSetImage printexcel = q.GetDataImage();  
  4.                ReportDataSource datasource = new ReportDataSource("DataSetImage", printexcel.Tables[0]);  
  5.                this.reportViewer1.LocalReport.DataSources.Clear();  
  6.                this.reportViewer1.LocalReport.DataSources.Add(datasource);  
  7.                this.reportViewer1.RefreshReport();  
  1. public DataSetImage GetDataImage()  
  2.         {  
  3.             
  4.             using (OleDbConnection con = new OleDbConnection(connection))  
  5.             {  
  6.                 using (OleDbCommand cmd = new OleDbCommand("SELECT UserID,UserNameAR,CountryAR,MemberAR,qrimg FROM AllPrinting"))  
  7.                 {  
  8.                     using (OleDbDataAdapter sda = new OleDbDataAdapter())  
  9.                     {  
  10.                         cmd.Connection = con;  
  11.                         sda.SelectCommand = cmd;  
  12.                         using (DataSetImage dsimage = new DataSetImage())  
  13.                         {  
  14.                             sda.Fill(dsimage, "DataTable1");  
  15.                             return dsimage;  
  16.                         }  
  17.                     }  
  18.                 }  
  19.             }  
  20.         }  


Final result i can show all data from access 2007 in report but image cannot display

can any one help me please if possible

i do every thing but really cannot show image .
 
 
 

Answers (1)