SSRS - Custom code - check if many ReportItems are Null. If they are then return False to the group to make invisible

Hi I want to create custom code to remove an entire group from the report if the particular ReportItem values are populated or not.
The cells are actually date fields.

What I want to do is create a custom code which will load in all 27 of the fields from ReportItems!txtDateChange1.Value through to ReportItems!txtDateChange27.Value.  

What is the best way to do this and can you provide and example?

Many thanks,
bruskhickoryAsked:
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.

Alexandre SimõesManager / Technology SpecialistCommented:
Sorry I don't have an SSRS at hand now but the logic should be something like setting the group visibility expression that evaluates the value of all those fields.

To do that you must use the null or not-set evaluation expression in SSRS is IsNothing.

So the final expression should be something like:
=iif(IsNothing(ReportItems!txtDateChange1.Value), False, True) And
iif(IsNothing(ReportItems!txtDateChange2.Value), False, True) And
iif(IsNothing(ReportItems!txtDateChange3.Value), False, True) And
iif(IsNothing(ReportItems!txtDateChange4.Value), False, True) And
iif(IsNothing(ReportItems!txtDateChange5.Value), False, True) And
iif(IsNothing(ReportItems!txtDateChange6.Value), False, True) And
iif(IsNothing(ReportItems!txtDateChange7.Value), False, True) And
iif(IsNothing(ReportItems!txtDateChange8.Value), False, True) And
iif(IsNothing(ReportItems!txtDateChange9.Value), False, True) And
iif(IsNothing(ReportItems!txtDateChange10.Value), False, True) And
iif(IsNothing(ReportItems!txtDateChange11.Value), False, True) And
iif(IsNothing(ReportItems!txtDateChange12.Value), False, True) And
iif(IsNothing(ReportItems!txtDateChange13.Value), False, True) And
iif(IsNothing(ReportItems!txtDateChange14.Value), False, True) And
iif(IsNothing(ReportItems!txtDateChange15.Value), False, True) And
iif(IsNothing(ReportItems!txtDateChange16.Value), False, True) And
iif(IsNothing(ReportItems!txtDateChange17.Value), False, True) And
iif(IsNothing(ReportItems!txtDateChange18.Value), False, True) And
iif(IsNothing(ReportItems!txtDateChange19.Value), False, True) And
iif(IsNothing(ReportItems!txtDateChange20.Value), False, True) And
iif(IsNothing(ReportItems!txtDateChange21.Value), False, True) And
iif(IsNothing(ReportItems!txtDateChange22.Value), False, True) And
iif(IsNothing(ReportItems!txtDateChange23.Value), False, True) And
iif(IsNothing(ReportItems!txtDateChange24.Value), False, True) And
iif(IsNothing(ReportItems!txtDateChange25.Value), False, True) And
iif(IsNothing(ReportItems!txtDateChange26.Value), False, True) And
iif(IsNothing(ReportItems!txtDateChange27.Value), False, True)

Open in new window

I can't remember if you can simply do:
=IsNothing(ReportItems!txtDateChange1.Value) And
IsNothing(ReportItems!txtDateChange2.Value)And ...

Open in new window

but you can try.

I can't test this and I think the show/hide logic is inverted here, but you get the idea.

Cheers
0

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
bruskhickoryAuthor Commented:
Perfect thanks
0
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
SSRS

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.