You may want to try a vertical layout container. Layout containers are used to nest 2 or more containers (although you can use just 1) so that when one sheet (container) has no data, the other sheet (container) fills up the complete layout container.
I agree with John's comments above - however your issue will be with the border. Titles and borders will not disappear using this method.
Depending on how technical you want to go - you could try one of my favourite tricks of all time by Joe Oppelt - "Popping and swapping"