MapReduce functions and report template.