ReportExportOptions

Zusammenfassung

The ReportExportOptions object represents a collection of optional properties that can be used with the export method on the Report object to configure how a report is exported.

Diskussion

This object is only needed if you want to export a Report with properties different than it's default values.

The CreateExportOptions function can be used to create a ReportExportOptions object if the class_type parameter is set to REPORT. The returned object contains all the properties needed to configure how report is exported. Currently a Report object can only be exported to PDF.

Eigenschaften

EigenschaftErläuterungDatentyp
customPages
(Lesen und schreiben)

A string that identifies the report pages to be exported if the exportPages property is set to CUSTOM. For example, the following string would export 5 pages: '1, 3, 5-7'. The default value is an empty string.

String
exportPages
(Schreibgeschützt)

A string constant that represents the collection of report pages to be exported. To change this value, use the setExportPages method. The default value is ALL.

  • ALL Export all pages in the report.
  • CUSTOMExport a custom set of pages that is defined using the customPages property.
  • EVENExport the even numbered pages of the report.
  • LASTExport the last page of the report.
  • ODDExport the odd numbered pages of the report.
String
startingPageNumberLabelOffset
(Lesen und schreiben)

Applies an offset to the page numbering to add additional pages to the beginning of the report. The default offset is 1.

Integer
totalPageNumberOverride
(Lesen und schreiben)

The total number of pages to label, for example, when your report displays X of Y pages. This is useful when you want to combine multiple reports into one. The default is -1, which means there is no override.

Integer

Methodenübersicht

MethodeErläuterung
setExportPages (export_pages)

A string constant that represents the collection of Report pages to export.

Methoden

setExportPages (export_pages)
ParameterErläuterungDatentyp
export_pages
  • ALL Export all pages in the report.
  • CUSTOMExport a custom set of pages that is defined using the customPages property.
  • EVENExport the even numbered pages of the report.
  • LASTExport the last page of the report.
  • ODDExport the odd numbered pages of the report.
String

Codebeispiel

ReportExportOptions example

The following script exports a Report object using default PDFFormat properties but configures the ReportExportOptions to export a custom set of report pages.

p = arcpy.mp.ArcGISProject('current')
rp = p.listReports('Report')[0]

pdf = arcpy.mp.CreateExportFormat('PDF', r'c:\temp\MS_PDF.pdf')

rpExOpt = arcpy.mp.CreateExportOptions('REPORT')
rpExOpt.setExportPages('CUSTOM')
rpExOpt.customPages = '1-3'

rp.export(pdf, msExOpt)