How to hide an empty block with no results The block is generated by Views and I the only field comes from a relationship and is not accessible in the filters, so I can't set a filter.

I have tried to use another field, rewrite the results but the filter only considers that initial value of the field, not the rewritten one.

I suspect I have to do something with a template file, but a precise how-to would be very helpful.

Thanks in advance!
try restricting the block's display using "Pages on which this PHP code returns TRUE (experts only)"  and checking for the final re-written value there.