arcpy.mapping.ExportReport: Error in generating report

1872
12
02-19-2018 08:09 AM
OliverRaskop
New Contributor

Hello,

I am using ArcGIS 10.5 Basic.

I try to create an Report using Python. I always get an error. So finally I tried the Example 1 from the online-help (ExportReport—Help | ArcGIS Desktop 😞 I created a mxd with the File name C:\Project\Project.mxd, I created a Feature-Layer "Accidents" with some polygons. I created a report using VIEW > REPORTS > CREATE REPORT and saved it as "C:\Project\Project.rlf"

Finally I copied the code in a script  "C:\Users\or\Documents\ArcGIS\test1.py" and run.

This is the message:

Traceback (most recent call last):
  File "<string>", line 254, in run_nodebug
  File "C:\Users\or\Documents\ArcGIS\test1.py", line 8, in <module>
    "SELECTED")
  File "C:\WinApps\CAD-GIS\GIS\ArcGIS\Desktop10.5\ArcPy\arcpy\utils.py", line 182, in fn_
    return fn(*args, **kw)
  File "C:\WinApps\CAD-GIS\GIS\ArcGIS\Desktop10.5\ArcPy\arcpy\mapping.py", line 532, in ExportReport
    return report_source._arc_object.ExportReport(*gp_fixargs((report_layout_file, output_file, dataset_option, report_title, starting_page_number, page_range, report_definition_query, extent, field_map), True))
RuntimeError: Error in generating report.

Any Idears?

Thanks,

Oliver

Tags (1)
0 Kudos
12 Replies
XanderBakker
Esri Esteemed Contributor

Since I can't reproduce it, it would be best to contact support, since this might have something to do with your specific installation.

Do you try with the "Background Geoprocessing (64-bit) switch off?

0 Kudos
OliverRaskop
New Contributor

Since enabling/disabling Backgrount geoprocessing in ArcMap (geoprocessing options) made no difference, I now uninstalled "Background Geoprocessing (64-bit)". This made a bit confusion: I could not find IDLE any more and PyScripter didn't start, so I had to reinstall PyScripter and find the IDLE.bat but now it works. And you were perfectly right: my script runs like a charm from PyScripter, from IDLE and from command prompt.

Thank you very much.

0 Kudos
José_LuisCc
New Contributor II

I found the same error message. the solution is in the printer configuration.

0 Kudos