added common code to index in report controller, all reports at all
levels use this code.