improving memory use in reports