First, the Union query has to include the "permitsout" field in the output.
Then in the not visible textbox in the detail section of the report, try the following as the control source:
=Iif(RigNum = 1, Iif(IsNull([permitsout]) = True, 0 ,1),0)
If that don't get it, I'll need to see a...