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"));
}

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.