ArcGIS Pro 2.9 API Reference Guide
CreateReport(String,ReportDataSource) Method

ArcGIS.Desktop.Reports Namespace > ReportFactory Class > CreateReport Method : CreateReport(String,ReportDataSource) Method
The name of the report.
ReportDataSource object defining data source, fields, and definition query for the report.
Creates a new report and adds it to a project. The source data for the report can be either a Layer or Table or a data connection to the data. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
Public Overloads Function CreateReport( _
   ByVal name As String, _
   ByVal reportDataSource As ReportDataSource _
) As Report

Parameters

name
The name of the report.
reportDataSource
ReportDataSource object defining data source, fields, and definition query for the report.

Return Value

The created report.
Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
reportDataSource
Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

See Also

Reference

ReportFactory Class
ReportFactory Members
Overload List