You can use the database source parameter along with the parameters to dynamically set the image source from byte arrays.
Code for:
var param2 = new ReportParameter() { Name = "CompanyLogo", Values = { Convert.ToBase64String(*ByteArrayImageObject*) } }; ReportViewer1.LocalReport.SetParameters(param2);
rdlc file:
1- Add text parameters 'CompanyLogo' and 'MIMEType'
2- Set the property of the image value to =System.Convert.FromBase64String(Parameters!CompanyLogo.Value)
3- Set the MIME Type property to
=Parameters!MIMEType.Value
4- Use the database as a source
How to make a PNG image (like a memory stream) on a .NET ReportViewer report surface
Muhammad Omar ElShourbagy
source share