-
Mar 8th, 2017, 05:49 PM
#1
Thread Starter
Member
How To Display Image From Access Database 2007 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
reportViewer1.LocalReport.EnableExternalImages = true;
QrClasses q = new QrClasses();
DataSetImage printexcel = q.GetDataImage();
ReportDataSource datasource = newReportDataSource("DataSetImage", printexcel.Tables[0]);
this.reportViewer1.LocalReport.DataSources.Clear();
this.reportViewer1.LocalReport.DataSources.Add(datasource);
this.reportViewer1.RefreshReport();
using (OleDbConnection con = newOleDbConnection(connection))
{
using (OleDbCommand cmd = newOleDbCommand("SELECT UserID,UserNameAR,CountryAR,MemberAR,qrimg FROM AllPrinting"))
{
using (OleDbDataAdapter sda = new OleDbDataAdapter())
{
cmd.Connection = con;
sda.SelectCommand = cmd;
using (DataSetImage dsimage = new DataSetImage())
{
sda.Fill(dsimage, "DataTable1");
return dsimage;
}
}
}
}
}
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 .
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|