Select to view content in your preferred language

ArcGIS Pro Report - only show attachments when present

101
1
a week ago
JohnFannon
Frequent Contributor

I am trying to create a report that will ultimately be published as a reporting service in ArcGIS Server. Our customer has asked that the report includes an appendix showing the attachments (photos) for any features in the report. 

I have created a details report to do this with a feature reference (from an attribute) and an attachment frame that is set as a 2x2 grid (ideally we would like this to auto expand based on how many photos there are, but that's a separate issue).

JohnFannon_0-1758905803478.png

This is working to a degree, but is producing a page (or record) for every feature, regardless of whether there are any attachments. So if there are 10 features and only 2 of them have attachments, it's generating a 10 page report with mostly empty pages, which is not good!

JohnFannon_2-1758906156715.png

I thought perhaps I could filter the report, but this seems to require a SQL expression (cannot use arcade) which would require a field containing the attachment count (or a flag). I also tried adding an Expression to the report to provide this attachment count - e.g. Count(Attachments($feature)). However, this produces an error along the lines of "Function is not supported in current profile". 

Showing attachments only when the exist seems like a common thing to want to do, given that not all features are necessarily going to have attachments. 

Is there a way to achieve this or workaround that doesn't involve adding an attachment count field to the feature layer? 

I don't think our customer will accept a report that includes multiple empty pages. 

1 Reply
BSBlagojevic
Regular Contributor

Not only attachments, but also other related reports where data is not entered.

0 Kudos