
@Amatya Sir,
Please follow this steps -
RDLC Report Configuration
-----------------------------
a) Add a blank RDLC Report and an Images folder to the Solution file.
b) Now add a Parameter to the RDLC Report of type text and provide a name say
MyDynamicImagePath c) Insert an Image on to the RDLC Report from Insert->Image . Select the Image Source as External
d) Go to image properties. There you will find various kind of options like General,Size,visibility,Action, Border.
- Choose the "General" tab and in the "Use this image" property write the formula
=Parameters!MyDynamicImagePath.Value
- Choose the "Size" tab and set the "Display" property as Original Size.
C# code
-------
N.B. ~ You must already have a ReportViewer Control in your design
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
ReportViewer1.LocalReport.ReportPath = Server.MapPath("~/Report.rdlc");
ReportViewer1.LocalReport.EnableExternalImages = true;
string imagePath = new Uri(Server.MapPath("~/images/TestImage.png")).AbsoluteUri;
ReportParameter parameter = new ReportParameter("MyDynamicImagePath", imagePath);
ReportViewer1.LocalReport.SetParameters(parameter);
ReportViewer1.LocalReport.Refresh();
}
}
Hope that helps
--
Thanks & Regards,
RNA Team
Amatya, if this helps please login to Mark As Answer. | Alert Moderator