updated custom report code