Picture element displaying picture from previous record
Hello, I'm having an issue with a person's picture printing in a group header.
The data source has a field in it that holds a URL address for the picture. The issue is if this field isn't set for one of the records (or maybe the URL address is invalid), it still prints the picture of the previous record (that was valid).
I've tried setting the Picture.ImageLocation in both the GroupHeader beforelayout and also the Picture_BeforePrint, but it doesn't seem to matter.
What do I need to do to make it recognize it shouldn't print it if the field isn't set?
private void GroupHeader1_BeforeLayout(object sender, EventArgs e)
{
Picture2.ImageLocation = ((String)Report.GetColumnValue("VitalsList.PictureURL"));
}
private void Picture2_BeforePrint(object sender, EventArgs e)
{
Picture2.ImageLocation = ((String)Report.GetColumnValue("VitalsList.PictureURL"));
}
The data source has a field in it that holds a URL address for the picture. The issue is if this field isn't set for one of the records (or maybe the URL address is invalid), it still prints the picture of the previous record (that was valid).
I've tried setting the Picture.ImageLocation in both the GroupHeader beforelayout and also the Picture_BeforePrint, but it doesn't seem to matter.
What do I need to do to make it recognize it shouldn't print it if the field isn't set?
private void GroupHeader1_BeforeLayout(object sender, EventArgs e)
{
Picture2.ImageLocation = ((String)Report.GetColumnValue("VitalsList.PictureURL"));
}
private void Picture2_BeforePrint(object sender, EventArgs e)
{
Picture2.ImageLocation = ((String)Report.GetColumnValue("VitalsList.PictureURL"));
}