Return Value
Report
Exception | Description |
---|---|
ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run. |
ReportProjectItem reportProjItem = Project.Current.GetItems<ReportProjectItem>().FirstOrDefault(item => item.Name.Equals(reportName)); Report report = reportProjItem?.GetReport();
//Open a report project item in a new view. //A report project item may exist but it may not be open in a view. //Reference a report project item by name ReportProjectItem reportPrjItem = Project.Current.GetItems<ReportProjectItem>().FirstOrDefault(item => item.Name.Equals("MyReport")); //Get the report associated with the report project item Report reportToOpen = await QueuedTask.Run(() => reportPrjItem.GetReport()); //Create the new pane IReportPane iNewReporttPane = await ProApp.Panes.CreateReportPaneAsync(reportToOpen); //GUI thread
Target Platforms: Windows 11, Windows 10