Implementing constraint between EmailReport and EmailTemplate. Template index of Email Reports. More tests.