Hey all,
I'm having trouble getting python to export a report in ArcMap 10.3. This is what I try to run:
import arcpy
rlf = r"D:\tool\tool_dev\Tool_Report.rlf"
layer = r"D:\tool\Test_Layer.lyr"
out = r"D:\tool\report.pdf"
arcpy.mapping.ExportReport(layer, rlf, out)
This is the output:
Traceback (most recent call last):
File "<pyshell#6>", line 1, in <module>
arcpy.mapping.ExportReport(layer, rlf, out)
File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\utils.py", line 182, in fn_
return fn(*args, **kw)
File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\mapping.py", line 524, in ExportReport
assert isinstance(report_source, (MapDocument, TableView, Layer)), str(type(report_source))
AssertionError: <type 'str'>
I get the same AssertionError no matter if I try to do it by command line within ArcMap, from IDLE, a new toolbox, or opening it with C:\Program Files (x86)\PYTHON27\ArcGIS10.3\python.exe. Additionally, I've tried it with background processing both on and off
Any ideas?