image in web report
Posted: Mon May 18, 2009 3:01 am
Hello,
Please add following method in your report code:
Also you need add usings to:
After then in BeforePrintEvent of image component:
Thank you.
Please add following method in your report code:
Code: Select all
public static Image LoadBitmap(string url)
{
WebClient cl = new WebClient();
cl.Credentials = CredentialCache.DefaultCredentials;
byte [] bytes = cl.DownloadData(url);
cl.Dispose();
MemoryStream stream = new MemoryStream(bytes);
return new Bitmap(stream);
}
Code: Select all
System.IO
System.Net
Code: Select all
Image1.ImageToDraw = LoadBitmap("http://www.stimulsoft.com/Images/Logo/stimulsoft.logo.png");