TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sos
NA
63
886
C# Showing pictures from "DataGridView" on RDLC report image
Feb 8 2021 9:44 PM
I want to display the selected image from datagridview in the image RDLC report .
I tried with this code but it doesn't work .
Not working :(
private
void
btnPrint_Click(
object
sender, EventArgs e)
{
frmPrint frm =
new
frmPrint();
// Datagrid opcije record set
frm.reportViewer1.LocalReport.DataSources.Clear();
frm.reportViewer1.LocalReport.ReportEmbeddedResource =
"XmlView.Report1.rdlc"
;
frm.reportViewer1.LocalReport.EnableExternalImages =
true
;
DataGridViewCell dgcell = gvData.SelectedRows[0].Cells[12];
if
(dgcell.Tag !=
null
)
{
string
imgCode = dgcell.Tag.ToString();
byte
[] bytes = Convert.FromBase64String(imgCode);
//using (MemoryStream m = new MemoryStream(bytes)) ;
ReportParameter[] parms =
new
ReportParameter[1];
parms[0] =
new
ReportParameter(
"txtImage"
, imgCode);
frm.reportViewer1.LocalReport.SetParameters(parms);
frm.reportViewer1.RefreshReport();
frm.reportViewer1.LocalReport.Refresh();
frm.ShowDialog();
}
}
Thanks in Advance
Reply
Answers (
6
)
How to disable add button until all data fields are entered
problem with font size in WPF