This code must exist nearly identically in Report, no? Abstract it?