<?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: Report in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/report/m-p/762013#M58773</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps related to 32-bit/64-bit issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://gis.stackexchange.com/questions/54642/has-anybody-used-arcpy-mapping-exportreport-successfully-on-64bit-machine"&gt;http://gis.stackexchange.com/questions/54642/has-anybody-used-arcpy-mapping-exportreport-successfully-on-64bit-machine&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Feb 2017 21:59:42 GMT</pubDate>
    <dc:creator>JamesCrandall</dc:creator>
    <dc:date>2017-02-27T21:59:42Z</dc:date>
    <item>
      <title>Report</title>
      <link>https://community.esri.com/t5/python-questions/report/m-p/762009#M58769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey guys,&lt;/P&gt;&lt;P&gt;I working to get a report to run from a script and I can not figure out what I'm doing wrong. Any help you would have would be great. Thanks!&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;import arcpy
mxd = arcpy.mapping.MapDocument(r"G:\Public\Storm Projects\NPDES II Permit\Detention Basin Inspections\NEW_Detention Basins.mxd")
df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
lyr = arcpy.mapping.ListTableViews(mxd, "ArcGISSDE.SDE.Detention_Basin_Inspection", df)[0]
arcpy.SelectLayerByAttribute_management(lyr, "SUBSET_SELECTION", "[Date]= '12/1/2015'")
print ('Test')
arcpy.mapping.ExportReport(lyr,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; r"M:\BrianLomas\RelationShipClassTest\DetentionBasin1.rlf",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; r"C:\Users\blomas\Desktop\ReportTest.pdf",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "SELECTED")
del mxd
‍‍‍‍‍‍‍‍‍‍‍&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I currently get this error...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Executing: Report&lt;BR /&gt;Start Time: Mon Feb 27 13:47:32 2017&lt;BR /&gt;Running script Report...&lt;BR /&gt;Failed script Report...&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt; File "M:\BrianLomas\Python Scripts\ImportantScripts\SelectReport.py", line 10, in &amp;lt;module&amp;gt;&lt;BR /&gt; "SELECTED")&lt;BR /&gt; File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\utils.py", line 182, in fn_&lt;BR /&gt; return fn(*args, **kw)&lt;BR /&gt; File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\mapping.py", line 532, in ExportReport&lt;BR /&gt; 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))&lt;BR /&gt;IOError: Could not write output file from report&lt;/P&gt;&lt;P&gt;Failed to execute (Report).&lt;BR /&gt;Failed at Mon Feb 27 13:47:34 2017 (Elapsed Time: 1.90 seconds)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:22:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/report/m-p/762009#M58769</guid>
      <dc:creator>BrianLomas</dc:creator>
      <dc:date>2021-12-12T08:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: Report</title>
      <link>https://community.esri.com/t5/python-questions/report/m-p/762010#M58770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the "ArcGIDSDE.SDE.Detention_Basic_Inspection" a single layer in the MXD?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2017 21:13:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/report/m-p/762010#M58770</guid>
      <dc:creator>MitchHolley1</dc:creator>
      <dc:date>2017-02-27T21:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Report</title>
      <link>https://community.esri.com/t5/python-questions/report/m-p/762011#M58771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes, it's actually a related table if that makes a difference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2017 21:16:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/report/m-p/762011#M58771</guid>
      <dc:creator>BrianLomas</dc:creator>
      <dc:date>2017-02-27T21:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: Report</title>
      <link>https://community.esri.com/t5/python-questions/report/m-p/762012#M58772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a reason you're using "SUBSET_SELECTION" selection method on that table? &amp;nbsp;Does the user select records prior to running this tool?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I would make that layer a single variable in the tool. &amp;nbsp;Right now the variable 'lyr' is assigned to an arcpy function of ListTableViews.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2017 21:56:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/report/m-p/762012#M58772</guid>
      <dc:creator>MitchHolley1</dc:creator>
      <dc:date>2017-02-27T21:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: Report</title>
      <link>https://community.esri.com/t5/python-questions/report/m-p/762013#M58773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps related to 32-bit/64-bit issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://gis.stackexchange.com/questions/54642/has-anybody-used-arcpy-mapping-exportreport-successfully-on-64bit-machine"&gt;http://gis.stackexchange.com/questions/54642/has-anybody-used-arcpy-mapping-exportreport-successfully-on-64bit-machine&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2017 21:59:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/report/m-p/762013#M58773</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2017-02-27T21:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: Report</title>
      <link>https://community.esri.com/t5/python-questions/report/m-p/762014#M58774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to get it to just output a few pages because I haven't been able to get it to output anything. So, I was wondering if maybe it was an "out of memory" issue I was getting when I ran it from view\run report in arcmap. I was hoping to eventually build a script I can run on a handful of pages at a time because of the memory issue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right now, the selection is built into the script...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;PRE class="" style="color: #000000; background: #f5f2f0; border: 0px; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;"SUBSET_SELECTION", "[Date]= '12/1/2015'")&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2017 22:01:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/report/m-p/762014#M58774</guid>
      <dc:creator>BrianLomas</dc:creator>
      <dc:date>2017-02-27T22:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: Report</title>
      <link>https://community.esri.com/t5/python-questions/report/m-p/762015#M58775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yea, I wondered that. I added that script to a toolbox and ran it from there as suggested but I get the same error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2017 22:03:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/report/m-p/762015#M58775</guid>
      <dc:creator>BrianLomas</dc:creator>
      <dc:date>2017-02-27T22:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: Report</title>
      <link>https://community.esri.com/t5/python-questions/report/m-p/762016#M58776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, I finally got this bad boy to work. Thanks to both of you guys. Below is the script that worked but I had to run it as a python script with no parameters and in the foreground. On to figuring out the next few steps. Thanks again.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;import arcpy
mxd = arcpy.mapping.MapDocument(r"G:\Public\Storm Projects\NPDES II Permit\Detention Basin Inspections\NEW_Detention Basins.mxd")
df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
lyr = arcpy.mapping.TableView ("ArcGISSDE.SDE.Detention_Basin_Inspection")
arcpy.mapping.ExportReport(lyr,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; r"M:\BrianLomas\RelationShipClassTest\DetentionBasin1.rlf",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; r"C:\Users\blomas\Desktop\ProjectReport.pdf")
del mxd&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:22:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/report/m-p/762016#M58776</guid>
      <dc:creator>BrianLomas</dc:creator>
      <dc:date>2021-12-12T08:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: Report</title>
      <link>https://community.esri.com/t5/python-questions/report/m-p/762017#M58777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you duplicate that selection in the Python GUI in that MXD without error?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/331109_pastedImage_1.png" style="width: 620px; height: 275px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2017 22:18:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/report/m-p/762017#M58777</guid>
      <dc:creator>MitchHolley1</dc:creator>
      <dc:date>2017-02-27T22:18:47Z</dc:date>
    </item>
  </channel>
</rss>

