Select to view content in your preferred language

Summary Reports GP Tool - How to get Area Description Field to work?

532
1
Jump to solution
09-06-2023 11:13 AM
RobStauder
Occasional Contributor

I posted a similar question two weeks ago here. I must be missing something.

How do I get the Summary Reports GP Tool's Area Description parameter to work, as in appear in my output?

Here's what I'm doing:

  1. Author a custom infographic with 1 image, 2 texts, 1 graph using 200, 2010, 2020, 2023, and 2028 population, and 1 comparison table with Places Sample data and Counties Sample data.
  2. In BA Desktop, import the info graphic from my content > report templates > right-click > Import Template
  3. Open GP Tool, Summary Reports. Set these parameters:
    1. Boundary Layer - Set to a feature layer with a layer def query w/1 feature
    2. Create Reports - Choose the imported infographic from step 2
    3. Output Folder - default
    4. Summarization Options - Individual features, Single Report Checked On.
    5. Report Output Formats - Checked On
    6. Area Description Field - set to a field with a name (eg: some town)
  4. Click  Run. Result: The PDF is created, but my site name is not populated from the Area Description field. 

RobStauder_0-1694023768562.png

How do I get my site name into that empty cell?

I know I can wrap this tool in python, and before invoking it, parse the report.xml, and insert my site name into the xml. It just seems like Area Description should work. 

0 Kudos
1 Solution

Accepted Solutions
RobStauder
Occasional Contributor

I figured it out. 

  1. After importing the template, find the template's report.xml. Open in a text editor.
  2. Find the first occurrence of <d f="headers.AREA_DESC"/>
  3. Change headers.AREA_DESC to headers.SITE_NAME and save
  4. Open Summary Reports
  5. Set the Store Name Field to the field with the value you want to appear in the site name cell.
  6. Run the tool.

A few notes:

I should have named this post "How to get the site name to appear in the output summary report?" I thought area description was correct  because the comparison table editor in the infographic builder looks like this - 

RobStauder_0-1694102688085.png

The report.xml contains a table definition that looks like this - 

 

<tr height="26.94076">
<td style="font-size:9.75;" align="center" valign="center" overrideStyle="TableHeader" pad="2.25" vpad="1.5">Sites</td>
<td style="font-size:9.75;" align="right" valign="center" overrideStyle="TableHeader" pad="2.25" vpad="1.5">2000 Total Population (U.S. Census)</td>
<td style="font-size:9.75;" align="right" valign="center" overrideStyle="TableHeader" pad="2.25" vpad="1.5">2010 Total Population (U.S. Census)</td>
<td style="font-size:9.75;" align="right" valign="center" overrideStyle="TableHeader" pad="2.25" vpad="1.5">2020 Total Population (U.S. Census)</td>
<td style="font-size:9.75;" align="right" valign="center" overrideStyle="TableHeader" pad="2.25" vpad="1.5">2023 Total Population (Esri)</td>
<td style="font-size:9.75;" align="right" valign="center" overrideStyle="TableHeader" pad="2.25" vpad="1.5">2028 Total Population (Esri)</td>
</tr>
<tr height="26.94076">
<td style="font-size:9.75;" align="center" valign="center" overrideStyle="Default" pad="2.25" vpad="1.5">
<d f="headers.AREA_DESC"/>
</td>
<td style="font-size:9.75;" align="right" valign="center" overrideStyle="Default" pad="2.25" vpad="1.5">
<d f="comparison_0.KEYUSFACTSTOTPOP00" m="#,#0"/>
</td>
<td style="font-size:9.75;" align="right" valign="center" overrideStyle="Default" pad="2.25" vpad="1.5">
<d f="comparison_0.AGEBYRACEBYSEXTOTPOP10" m="#,#0"/>
</td>
<td style="font-size:9.75;" align="right" valign="center" overrideStyle="Default" pad="2.25" vpad="1.5">
<d f="comparison_0.KEYUSFACTSTOTPOP20" m="#,#0"/>
</td>
<td style="font-size:9.75;" align="right" valign="center" overrideStyle="Default" pad="2.25" vpad="1.5">
<d f="comparison_0.ATRISKTOTPOPCY" m="#,#0"/>
</td>
<td style="font-size:9.75;" align="right" valign="center" overrideStyle="Default" pad="2.25" vpad="1.5">
<d f="comparison_0.AGEBYRACEBYSEXTOTPOPFY" m="#,#0"/>
</td>
</tr>

 

The first headers.AREA_DESC is where the missing site name should go. Subsequent rows populate correctly. "headers" refers to entries in a fields element in metadata.xml (another file in the imported template). headers.SITE_NAME refers to a "SpecialField" in metadata.xml. 

 

 

View solution in original post

0 Kudos
1 Reply
RobStauder
Occasional Contributor

I figured it out. 

  1. After importing the template, find the template's report.xml. Open in a text editor.
  2. Find the first occurrence of <d f="headers.AREA_DESC"/>
  3. Change headers.AREA_DESC to headers.SITE_NAME and save
  4. Open Summary Reports
  5. Set the Store Name Field to the field with the value you want to appear in the site name cell.
  6. Run the tool.

A few notes:

I should have named this post "How to get the site name to appear in the output summary report?" I thought area description was correct  because the comparison table editor in the infographic builder looks like this - 

RobStauder_0-1694102688085.png

The report.xml contains a table definition that looks like this - 

 

<tr height="26.94076">
<td style="font-size:9.75;" align="center" valign="center" overrideStyle="TableHeader" pad="2.25" vpad="1.5">Sites</td>
<td style="font-size:9.75;" align="right" valign="center" overrideStyle="TableHeader" pad="2.25" vpad="1.5">2000 Total Population (U.S. Census)</td>
<td style="font-size:9.75;" align="right" valign="center" overrideStyle="TableHeader" pad="2.25" vpad="1.5">2010 Total Population (U.S. Census)</td>
<td style="font-size:9.75;" align="right" valign="center" overrideStyle="TableHeader" pad="2.25" vpad="1.5">2020 Total Population (U.S. Census)</td>
<td style="font-size:9.75;" align="right" valign="center" overrideStyle="TableHeader" pad="2.25" vpad="1.5">2023 Total Population (Esri)</td>
<td style="font-size:9.75;" align="right" valign="center" overrideStyle="TableHeader" pad="2.25" vpad="1.5">2028 Total Population (Esri)</td>
</tr>
<tr height="26.94076">
<td style="font-size:9.75;" align="center" valign="center" overrideStyle="Default" pad="2.25" vpad="1.5">
<d f="headers.AREA_DESC"/>
</td>
<td style="font-size:9.75;" align="right" valign="center" overrideStyle="Default" pad="2.25" vpad="1.5">
<d f="comparison_0.KEYUSFACTSTOTPOP00" m="#,#0"/>
</td>
<td style="font-size:9.75;" align="right" valign="center" overrideStyle="Default" pad="2.25" vpad="1.5">
<d f="comparison_0.AGEBYRACEBYSEXTOTPOP10" m="#,#0"/>
</td>
<td style="font-size:9.75;" align="right" valign="center" overrideStyle="Default" pad="2.25" vpad="1.5">
<d f="comparison_0.KEYUSFACTSTOTPOP20" m="#,#0"/>
</td>
<td style="font-size:9.75;" align="right" valign="center" overrideStyle="Default" pad="2.25" vpad="1.5">
<d f="comparison_0.ATRISKTOTPOPCY" m="#,#0"/>
</td>
<td style="font-size:9.75;" align="right" valign="center" overrideStyle="Default" pad="2.25" vpad="1.5">
<d f="comparison_0.AGEBYRACEBYSEXTOTPOPFY" m="#,#0"/>
</td>
</tr>

 

The first headers.AREA_DESC is where the missing site name should go. Subsequent rows populate correctly. "headers" refers to entries in a fields element in metadata.xml (another file in the imported template). headers.SITE_NAME refers to a "SpecialField" in metadata.xml. 

 

 

0 Kudos