Inventory templates - Hiding empty lines

Inventory templates - Hiding empty lines

Is there a way to modify inventory templated to hide empty address lines?

We currently have our templates formatted with each address field on a separate line. In most cases one or more fields are blank which leaves blank line on the output template. Is it possible to test for the empty field and not output the line?

Many thanks