public async void Load(ReportInfo specifiedReport) { clearOut(); // track changes this.originalInfo = specifiedReport.Copy(); this.ReportDefinition = specifiedReport; // parameters if (Parameters != null) { Parameters.CollectionChanged -= paramsCollection_CollectionChanged; } Parameters = ReportDefinition.Parameters; Parameters.CollectionChanged += paramsCollection_CollectionChanged; // template if (SectionsCV != null) { SectionsCV.CurrentChanged -= SectionsCV_CurrentChanged; } byte[] buf = await reprepo.GetTemplateAsync(ReportDefinition.ID); if (buf == null) { Template = null; TemplateMessage = string.Format("No template selected"); SectionsCV = null; } else { IReportType rt = reportingService.GetReportType(ReportDefinition.ReportType); Template = rt.CreateTemplate(buf); SectionsCV = new CollectionView(Template.SectionNames); SectionsCV.CurrentChanged += SectionsCV_CurrentChanged; } // notify raise(); }