Original code working with Pareto changes to reports.