<?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: create a report with images with python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/create-a-report-with-images-with-python/m-p/609040#M47537</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;why are you deleting&amp;nbsp; &lt;CODE&gt;report_Output&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;before you are done with it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Dec 2017 15:10:29 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2017-12-05T15:10:29Z</dc:date>
    <item>
      <title>create a report with images with python</title>
      <link>https://community.esri.com/t5/python-questions/create-a-report-with-images-with-python/m-p/609039#M47536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Creating a report for a holiday lights system. Residents submit pictures, comments and address to the communications department. We run scripts to create a point FC from addresses and manage the publishing of the service on a nightly basis. We have a web app that lets users see the pictures, download pdfs showing the pictures with a map of the location and provide routing if they wish. We have&amp;nbsp;maps generated with Data Driven Pages to create these pdfs. We want to add a report that shows the homes in a more condensed format. See the attached image for the report that was created within ArcMap. I want to export that with python but I get an error:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'exporting summary report...'&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; report_MapDoc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"\\\\netapp02\\data\\vol4\\mis\\GIS\\Enterprise\\MapDocs\\misgis0290\\HolidayLights.mxd"&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; report_Layout &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"\\\\netapp02\\data\\vol4\\mis\\GIS\\Enterprise\\MapDocs\\misgis0290\\HolidayLights.rlf"&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; report_Output &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"\\\\pslgis-vm\\webapp\\com\\HolidayLights\\images\\LightsReport.pdf"&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; reportMxd &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&amp;nbsp; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MapDocument&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;report_MapDoc&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; df &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ListDataFrames&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;reportMxd&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; lyr &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ListLayers&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;df&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Delete_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;report_Output&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; lyr
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ExportReport&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lyr&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; report_Layout&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; report_Output&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and I get this error&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;Traceback (most recent call last):
&amp;nbsp; File "C:\PythonUpdateScripts\UpdateHolidayLights.py", line 279, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; main()
&amp;nbsp; File "C:\PythonUpdateScripts\UpdateHolidayLights.py", line 255, in main
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.mapping.ExportReport(lyr, report_Layout, report_Output)
&amp;nbsp; File "C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\utils.py", line 182, in fn_
&amp;nbsp;&amp;nbsp;&amp;nbsp; return fn(*args, **kw)
&amp;nbsp; File "C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\mapping.py", line 532, in ExportReport
&amp;nbsp;&amp;nbsp;&amp;nbsp; 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&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;If I remove the picture on the right for each record, the report runs as expected. Is this a limitation of using arcpy.mapping and reporting?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:04:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-a-report-with-images-with-python/m-p/609039#M47536</guid>
      <dc:creator>MichaelKohler</dc:creator>
      <dc:date>2021-12-12T02:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: create a report with images with python</title>
      <link>https://community.esri.com/t5/python-questions/create-a-report-with-images-with-python/m-p/609040#M47537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;why are you deleting&amp;nbsp; &lt;CODE&gt;report_Output&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;before you are done with it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2017 15:10:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-a-report-with-images-with-python/m-p/609040#M47537</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-12-05T15:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: create a report with images with python</title>
      <link>https://community.esri.com/t5/python-questions/create-a-report-with-images-with-python/m-p/609041#M47538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm deleting the old copy from last night. the process is run nightly. This is just part of a much larger python script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2017 15:11:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-a-report-with-images-with-python/m-p/609041#M47538</guid>
      <dc:creator>MichaelKohler</dc:creator>
      <dc:date>2017-12-05T15:11:52Z</dc:date>
    </item>
  </channel>
</rss>

