How to simplify this simple code?

Printable View