ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Create Territory Report

Available with Business Analyst license.

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Generates a report for a Territory Solution.

Usage

  • Each statistics field variable must be in the following format: ‘Variable' Calc, where Calc is one of the Territory Design calculators specified from the ATDConfig.xml file.

  • Each data field variable and chart variable must be in the following format: ‘Variable'.

  • By default, the Report Folder Location is under the "Reports" folder in the current BA project.

Syntax

arcpy.td.CreateTerritoryReport_td(in_territory_solution_layer, {in_stat_fields}, {in_data_fields}, {in_chart_fields}, {in_report_location}, {in_report_name}, {in_report_title})
ParameterExplanationData Type
in_territory_solution_layer

The Territory Solution layer to be used in the Report.

GP TD Layer
in_stat_fields
[in_stat_fields,...]
(Optional)

The variables to be included inside the Statistics section of the report.

GP Value Table
in_data_fields
[in_data_fields,...]
(Optional)

The variables to be included inside the Data section of the report.

GP Value Table
in_chart_fields
[in_chart_fields,...]
(Optional)

The variables to be included inside the Chart section of the Report.

GP Value Table
in_report_location
(Optional)

The location of the Report Folder.

Folder
in_report_name
(Optional)

The name of the Report file.

String
in_report_title
(Optional)

The title of the Report.

String

Code sample

The following Python window script demonstrates how to use Business Analyst geoprocessing tool in immediate mode.

import arcgisscripting
gp = arcgisscripting.create()
gp.CreateTerritoryReport_TD("new layer", "'Count';'AREA_SUM' SUM;'AREA_SUM' MIN;'TOTPOP_CY_SUM' MAX", "'Count';'AREA_SUM';'TOTPOP_CY_SUM'", "'Count';'AREA_SUM';'TOTPOP_CY_SUM'", "C:/BA Output/Project/Default Project/Reports/", "New Report" , "The Territory Report of New Territory Solution")

The following stand-alone script demonstrates how to use the tool.

# Import system modules
import arcgisscripting
gp = arcgisscripting.create()

# Set local variables
solution = "new layer"
statistics = "'Count';'AREA_SUM' SUM;'AREA_SUM' MIN;'TOTPOP_CY_SUM' MAX"
data = "'Count';'AREA_SUM';'TOTPOP_CY_SUM'"
chart = "'Count';'AREA_SUM';'TOTPOP_CY_SUM'"
folder = "C:/BA Output/Project/Default Project/Reports/"
name = "New Report"
title = "The Territory Report of New Territory Solution"

# Execute tool
gp.CreateTerritoryReport_TD(solution, statistics, data, chart, folder, name, title)

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: Requires Business Analyst
  • Standard: Requires Business Analyst
  • Advanced: Requires Business Analyst

Related topics

  • An Overview of the Reports Toolset
  • Create Territories
  • Create Territory Solution
  • Compare Territory Solutions
  • Create Detailed Territory Report

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal