<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ExportReport issues - ArcMap 10.3 in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/exportreport-issues-arcmap-10-3/m-p/62558#M5058</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thing is though, there are only the 3 required parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, you were absolutely correct about going with the examples. After following them closely, I figured out what was going on - despite directly referencing a .lyr file as the lyr file input, it wanted me to declare it as a layer&amp;nbsp;file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lyr = arcpy.mapping.Layer(&lt;SPAN style="background-color: #ffffff;"&gt;"D:\tool\Test_Layer.lyr")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then this worked:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;arcpy.mapping.ExportReport(lyr, rlf, out)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Glad we got it figured out!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Nov 2017 19:44:09 GMT</pubDate>
    <dc:creator>DavidChan2</dc:creator>
    <dc:date>2017-11-02T19:44:09Z</dc:date>
    <item>
      <title>ExportReport issues - ArcMap 10.3</title>
      <link>https://community.esri.com/t5/python-questions/exportreport-issues-arcmap-10-3/m-p/62554#M5054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having trouble getting python to export a report in ArcMap 10.3. This is what I try to run:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;rlf = r"D:\tool\tool_dev\Tool_Report.rlf"&lt;BR /&gt;layer = r"D:\tool\Test_Layer.lyr"&lt;BR /&gt;out = r"D:\tool\report.pdf"&lt;/P&gt;&lt;P&gt;arcpy.mapping.ExportReport(layer, rlf, out)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the output:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; File "&amp;lt;pyshell#6&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; arcpy.mapping.ExportReport(layer, rlf, out)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\utils.py", line 182, in fn_&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; return fn(*args, **kw)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\mapping.py", line 524, in ExportReport&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; assert isinstance(report_source, (MapDocument, TableView, Layer)), str(type(report_source))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;AssertionError: &amp;lt;type 'str'&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I get the same AssertionError no matter if I try to do it by command line within ArcMap, from IDLE, a new toolbox, or&amp;nbsp;opening it with&amp;nbsp;C:\Program Files (x86)\PYTHON27\ArcGIS10.3\python.exe. Additionally, I've tried it with background processing both on and off&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Any ideas?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Nov 2017 18:38:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exportreport-issues-arcmap-10-3/m-p/62554#M5054</guid>
      <dc:creator>DavidChan2</dc:creator>
      <dc:date>2017-11-02T18:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: ExportReport issues - ArcMap 10.3</title>
      <link>https://community.esri.com/t5/python-questions/exportreport-issues-arcmap-10-3/m-p/62555#M5055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Were you able to use this script in an earlier version of ArcMap?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Nov 2017 19:15:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exportreport-issues-arcmap-10-3/m-p/62555#M5055</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2017-11-02T19:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: ExportReport issues - ArcMap 10.3</title>
      <link>https://community.esri.com/t5/python-questions/exportreport-issues-arcmap-10-3/m-p/62556#M5056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nope, I haven't tried before. But given that each of the variables are pretty straight forward - a polygon layer with an attribute table, an rlf file that I've made myself, and a generic output PDF directory - and the limited inputs needed&amp;nbsp;for the arcpy function, I can't figure out what I'm doing wrong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Nov 2017 19:18:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exportreport-issues-arcmap-10-3/m-p/62556#M5056</guid>
      <dc:creator>DavidChan2</dc:creator>
      <dc:date>2017-11-02T19:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: ExportReport issues - ArcMap 10.3</title>
      <link>https://community.esri.com/t5/python-questions/exportreport-issues-arcmap-10-3/m-p/62557#M5057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are many parameters you have skipped, I would used named parameters if you aren't going to specify the defaults within your ExportReport statement.&amp;nbsp; Examples are in the help files&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-mapping/exportreport.htm"&gt;http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-mapping/exportreport.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Nov 2017 19:21:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exportreport-issues-arcmap-10-3/m-p/62557#M5057</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-11-02T19:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: ExportReport issues - ArcMap 10.3</title>
      <link>https://community.esri.com/t5/python-questions/exportreport-issues-arcmap-10-3/m-p/62558#M5058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thing is though, there are only the 3 required parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, you were absolutely correct about going with the examples. After following them closely, I figured out what was going on - despite directly referencing a .lyr file as the lyr file input, it wanted me to declare it as a layer&amp;nbsp;file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lyr = arcpy.mapping.Layer(&lt;SPAN style="background-color: #ffffff;"&gt;"D:\tool\Test_Layer.lyr")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then this worked:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;arcpy.mapping.ExportReport(lyr, rlf, out)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Glad we got it figured out!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Nov 2017 19:44:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exportreport-issues-arcmap-10-3/m-p/62558#M5058</guid>
      <dc:creator>DavidChan2</dc:creator>
      <dc:date>2017-11-02T19:44:09Z</dc:date>
    </item>
  </channel>
</rss>

