Let's say you have a load of fields on the View page and want to hide those that are empty.
For this purpose in 'View page: before display' event use the following code for each field you need to hide. This example uses field named EPAHighway:
if ($values["EPAHighway"]=="" || $values["EPAHighway"]==0)
$xt->assign("EPAHighway_fieldblock",false);