I'm programming a solution that can have up to 10 images (with legend). When printing a report, I want to hide the empty image frames and legends. How can it be done?