adding custom-defined functions for all report views

copy pasta is getting worse, really need to clean this up