fix bug of view sort of reports, refine code update exists report.