you can't. you need to know that you are going to suppress all the G2 lines before G1 is printed.
You would need to write a subreport that determines if any G2 lines are printed and use that result to determine if you need to suppress G1.
Personally, I try to avoid subreports, but in situations like this, they are required, unless you are retrieving your data from a stored proc, in which case you can create a column that holds a flag as whether or not to suppress G1.
HTH