Loading Image From URL in PictureObject
Hello,
I am trying to load image from URL in Picture Object in Fast Report. I am using 2019.2.15 demo version fast report designer.
I have assigned variable to DataBand as below.
<DataBand>
<PictureObject Name="Picture2" ImageLocation="[MyModel.URL]" "/>
</DataBand>
But its not working. Not loading image from URL.
Can anyone please help me ?
Thanks
I am trying to load image from URL in Picture Object in Fast Report. I am using 2019.2.15 demo version fast report designer.
I have assigned variable to DataBand as below.
<DataBand>
<PictureObject Name="Picture2" ImageLocation="[MyModel.URL]" "/>
</DataBand>
But its not working. Not loading image from URL.
Can anyone please help me ?
Thanks
This discussion has been closed.
Comments
Hello!
Use the DataColumn = “MyModel.URL” property (instead of ImageLocation), or set the ImageLocation property in the Picture2_BeforePrint event:
private void Picture2_BeforePrint(object sender, EventArgs e) { var pic = (PictureObject)sender; pic.ImageLocation = Convert.ToString(Report.GetColumnValue(“MyModel.URL”)); }If this is an HTTPS link and you’re working with the .NET Framework, add support for TLS 1.2 at application startup (ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12;), or load the image bytes via HttpClient and pass them to pic.SetImageData(bytes)