Search code examples
imagereportbirt

BIRT Report Designer - Change Text of Missing Dynamic Images


I built a BIRT report with dynamic images in it. However, when a dynamic image is missing, the following text is displayed in place of the image: "The resource of this report item is not reachable." Is there a way to change that text to something else? I would prefer it say something like "Image not found". Thank you!


Solution

  • I discovered how to change the text by using the Visibility attribute in the Properties tab of the Image. I checked Hide Element and added the expression row["Image"] == null. I then created a new label with the text "No Image" and checked Hide Element and added the expression row["Image"] != null. This successfully changed the default text for a missing dynamic image file. It should be noted that I had to add padding to the bottom of the "No Image" text in order for the other data elements to show up in the correct place.