Fixed all compile problems around ReportType. Changed Report page and preview to deal with templates