Run a report from an ArcGIS Notebook
You can use the VertiGIS Studio Reporting Client for Python package to run reports from ArcGIS Notebooks.
Prerequisites
- ArcGIS Online or ArcGIS Enterprise 10.7+
- An ArcGIS user with permission to create and edit ArcGIS Notebooks
- An existing VertiGIS Studio Report that accepts a
FeatureIds
parameter
Author the Notebook
- Sign into ArcGIS Online or ArcGIS Enterprise as a Notebook Author user
- Create a new Notebook
- Add a cell with the following script:
!pip install geocortex-reporting-client
- Run the cell to install the
geocortex-reporting-client
package - Add a cell with the following script:
from geocortex.reporting.client import run
report = await run("itemid", FeatureIds=[1, 2, 3])
print(report)
- Replace
itemid
with the ArcGIS item ID of your report - Update the array
[1, 2, 3]
to contain the feature IDs of the features you want to generate the report for - Run the cell to generate the report
ArcGIS Enterprise Support
The same process applies to ArcGIS Enterprise 10.7+ but you must also supply the portal_url
argument to the run
method
report = await run(
"itemid",
portal_url="https://myportal.server.com/portal",
FeatureIds=[1, 2, 3]
)