ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Core Namespace / ReportFrameworkExtender Class / CreateReportPaneAsync Method
Does not need to be specified.
Report
Example

In This Topic
    CreateReportPaneAsync Method
    In This Topic
    Create and activate a new report pane using a Report reference. Must be called on GUI thread.
    Syntax
    public static Task<IReportPane> CreateReportPaneAsync( 
       PaneCollection panes,
       Report report
    )
    Public Shared Function CreateReportPaneAsync( _
       ByVal panes As PaneCollection, _
       ByVal report As Report _
    ) As Task(Of IReportPane)

    Parameters

    panes
    Does not need to be specified.
    report
    Report

    Return Value

    Exceptions
    ExceptionDescription
    Must be called on GUI thread
    Remarks
    Be sure to call this on the GUI thread. Do not execute within a QueuedTask.Run block.
    Example
    Open a Report project item in a new view
    //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
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also