Hi.. I have the following code with is throwing an out of memory exception.
The report returns just 300 records.. (12 fields) and only 10 records 'hit' this code to load an image.
Any ideas?
private void pictureBox1_ItemDataBinding(object sender, EventArgs e)
{
Telerik.Reporting.Processing.ReportItemBase itemBase = (Telerik.Reporting.Processing.ReportItemBase)sender;
string file = itemBase.DataObject["PHOTO_filename"] as string;
if (!String.IsNullOrEmpty(file) && File.Exists("S:\\Conference\\photos_noncrm\\" + file))
{
Image image1 = Image.FromFile(@"S:\\Conference\\photos_noncrm\\" + file);
this.pictureBox1.Value = image1;
}
else
{
this.pictureBox1.Value = "=Fields.PHOTO";
}
}
The report returns just 300 records.. (12 fields) and only 10 records 'hit' this code to load an image.
Any ideas?
private void pictureBox1_ItemDataBinding(object sender, EventArgs e)
{
Telerik.Reporting.Processing.ReportItemBase itemBase = (Telerik.Reporting.Processing.ReportItemBase)sender;
string file = itemBase.DataObject["PHOTO_filename"] as string;
if (!String.IsNullOrEmpty(file) && File.Exists("S:\\Conference\\photos_noncrm\\" + file))
{
Image image1 = Image.FromFile(@"S:\\Conference\\photos_noncrm\\" + file);
this.pictureBox1.Value = image1;
}
else
{
this.pictureBox1.Value = "=Fields.PHOTO";
}
}