Sort views before printing