<?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: Unable to Generate PDF Reports with Python in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/unable-to-generate-pdf-reports-with-python/m-p/1508947#M58072</link>
    <description>&lt;P&gt;You are missing a couple of parameters to help control the output.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Review the &lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.apps.survey123.html#surveymanager" target="_blank" rel="noopener"&gt;SurveyManager.generate_report docs&lt;/A&gt;&lt;UL&gt;&lt;LI&gt;You should specify a `where` parameter, otherwise it will return a zip file of all records&lt;/LI&gt;&lt;LI&gt;You should also use the `save_folder` parameter to specify where it should be saved&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Tue, 23 Jul 2024 23:23:56 GMT</pubDate>
    <dc:creator>ClayDonaldsonSWCA</dc:creator>
    <dc:date>2024-07-23T23:23:56Z</dc:date>
    <item>
      <title>Unable to Generate PDF Reports with Python</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/unable-to-generate-pdf-reports-with-python/m-p/1508892#M58066</link>
      <description>&lt;P&gt;I am trying to automate the report generation of a survey123 survey.&lt;/P&gt;&lt;P&gt;I have tried both in my orgs AGOL Notebooks as well as in a dedicated python IDE (PyCharm in this case, changing the GIS parameters accordingly).&lt;/P&gt;&lt;P&gt;The Notebook keeps saying it is generating a zip in a tmp location.&amp;nbsp; I cannot find that location, and I need it to output PDFs not in a zip file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcgis
from arcgis.gis import GIS
gis = GIS("home")

survey_manager = arcgis.apps.survey123.SurveyManager(gis)
survey_by_id = survey_manager.get("mySurveyID")

template = survey_by_id.report_templates[0]
pdf_report = survey_by_id.generate_report(template, output_format="pdf")
print("Single report as PDF: ", pdf_report)&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ColtonSnelling1_0-1721767902594.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/110424i6588B33A763281A1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ColtonSnelling1_0-1721767902594.png" alt="ColtonSnelling1_0-1721767902594.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 20:52:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/unable-to-generate-pdf-reports-with-python/m-p/1508892#M58066</guid>
      <dc:creator>ColtonSnelling1</dc:creator>
      <dc:date>2024-07-23T20:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to Generate PDF Reports with Python</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/unable-to-generate-pdf-reports-with-python/m-p/1508947#M58072</link>
      <description>&lt;P&gt;You are missing a couple of parameters to help control the output.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Review the &lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.apps.survey123.html#surveymanager" target="_blank" rel="noopener"&gt;SurveyManager.generate_report docs&lt;/A&gt;&lt;UL&gt;&lt;LI&gt;You should specify a `where` parameter, otherwise it will return a zip file of all records&lt;/LI&gt;&lt;LI&gt;You should also use the `save_folder` parameter to specify where it should be saved&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Tue, 23 Jul 2024 23:23:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/unable-to-generate-pdf-reports-with-python/m-p/1508947#M58072</guid>
      <dc:creator>ClayDonaldsonSWCA</dc:creator>
      <dc:date>2024-07-23T23:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to Generate PDF Reports with Python</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/unable-to-generate-pdf-reports-with-python/m-p/1509284#M58082</link>
      <description>&lt;P&gt;If I am always generating/downloading at least 2 reports at a time, is it always going to be a zip file?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2024 14:34:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/unable-to-generate-pdf-reports-with-python/m-p/1509284#M58082</guid>
      <dc:creator>ColtonSnelling1</dc:creator>
      <dc:date>2024-07-24T14:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to Generate PDF Reports with Python</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/unable-to-generate-pdf-reports-with-python/m-p/1509402#M58090</link>
      <description>&lt;P&gt;yes if your query is set-up that way. Two solutions to that:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Set up another function to query the data and get a list of object ids. Then use a `for` loop to generate a single report per objectid. (doesnt have to be object id, could be any unique value)&lt;/LI&gt;&lt;LI&gt;Use python module&amp;nbsp;zipfile to extract the pdfs&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Wed, 24 Jul 2024 16:21:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/unable-to-generate-pdf-reports-with-python/m-p/1509402#M58090</guid>
      <dc:creator>ClayDonaldsonSWCA</dc:creator>
      <dc:date>2024-07-24T16:21:32Z</dc:date>
    </item>
  </channel>
</rss>

