SSRS with per-page group - how to hide or show items based on displayed group

I have created a SSRS report which is to be a mail label.  The dataset is a list of addresses to print and I have created a group on the addresses with a new page after each group.  The report looks like the following:

The Expression shown is the address which is working fine.  The problem is I need to change the visibility of the images to the right based on properties of that group.  For example, the dataset has the field IsFirstClass which, if true, means the 2nd class image should be shown.  There is also a field HideCustomsForm which if true means the Customs declaration form should be hidden.

How can I have the visibility property of these images refer to fields in the currently displayed group?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

x-menIT super heroCommented:
make each image a "subreport" that is trigered by the properties of the group

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ValentinoVBI ConsultantCommented:
The Image object has got a property called Hidden.  Assuming the Image object is located inside a tablix which is connected to your dataset, you could use an expression like:

=IIF(Fields!IsFirstClass.Value, False, True)

Open in new window

This expression would show the image when IsFirstClass is set to True, otherwise it will be hidden.
canuckconsultingAuthor Commented:
X-Men: I can see this is the way forward but am struggling to work out how to get the positioning right.  Would I create a tablix of one row, expand that to my label size and then place subreports within this?  It doesn't seem right that (and I'm not sure if possible) but I can work out how else to have the subreports refer to the current record/group.
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

canuckconsultingAuthor Commented:
ValentinoV - Thanks for the feedback but the issue I'm having is having that the visibility based on a data field active in a tablix on the same page.
ValentinoV  does have half of the code right ....

=IIF(Trim(Fields!MyTablixFieldName.Value), IIF(Trim(Fields!IsFirstClass.Value), False, True),False)
canuckconsultingAuthor Commented:
In the end I created a report with a single subreport sized to fit a quarter of the report size.  Within this subreport I used the code above to show/hide the relevant images.

Thanks for your help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.