Left click on the footer or section you want to be invisible
Click on event
Open "On Format"
Click code builder
In the code loop through the fields you're checking for null
If all null then set the visibility property to each section to not visible
I didn't test it but it should work