def column_has_value(data, fieldname):
	has_value = False

	for row in data:
		value = row.get(fieldname)
		if value:
			if isinstance(value, basestring):
				if strip_html(value).strip():
					has_value = True
					break
			else:
				has_value = True
				break

	return has_value
Check if at least one cell in column has non-zero and non-blank value
dataset/ETHPy150Open frappe/frappe/frappe/templates/pages/print.py/column_has_value