Select to view content in your preferred language

Chart data not updating with Table updateConnectionProperties method

416
4
02-19-2024 07:27 PM
ColinLindeman
New Contributor II

Hi,


When I use the function layer.updateConnectionProperies in the Python View in an ArcGIS Pro Project on a Table that has a broken data source, it and its Chart are updated with the new data source.

When the same function is run in a standalone script that exports a pdf file from a Report that contains a Supplemental Page with a Layout that contains the Table and Chart, the Table updates but the Chart does not.

I'm trying to figure out how to get that Chart to update so that my Report can be reused in different ArcGIS Pro Projects with different Databases.

0 Kudos
4 Replies
ColinLindeman
New Contributor II

As a workaround it seems that toggling one Chart's visibility to off, then on, then exporting the Report to PDF will update all Charts to their Tables' new data source in the PDF.

0 Kudos
ColinLindeman
New Contributor II

Unfortunately this workaround is not working when the tool is run from the ArcGIS Pro Project GUI.

0 Kudos
ChristopherAllen
Esri Contributor

Hi @ColinLindeman ,

The chart should automatically update when the data source is changed regardless of the environment. Unfortunately, I was unable to reproduce the problem you're seeing. I created a standalone script to update a layer's connection properties and export the report (with a supplemental page that includes a layout with the chart) to PDF. The chart was updated with the new data source in the PDF.

I'd appreciate if you're able to share any other details about your specific workflow. In my script I was setting the data source to a layer stored in a File GDB, but perhaps your data is stored differently? If you're able to share the script and/or project you're using, please feel free to send to callen@esri.com.

Thanks!
Chris

0 Kudos
ColinLindeman
New Contributor II

Hi Chris, I am using SQL Server 15.0.2000 Databases. I will send you the scripts.