Hello,
I am having trouble understanding the behavior of the printing services with custom report template support released with 11.2
I published a printing service with a layout template (pagx), a report file (rptx) and a report template (rptt). The report is intended to work with single features, i.e., a definition expression is set on the feature layer that serves as the data source for the report.
Using the report template, the field names of the data source have to be specified in the reportOptions to show up in the report. When i execute a print task with a layout template and a report template set, the tool works as intended, I get a two-page pdf with a map and the report for the single selected feature.
When I only specify a report template and set the layout template to MAP_ONLY or nothing, the tool should return a report without map (see https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PrintTemplate.html#r...). The service however returns the local path of the pdf on the arcgis server
D:\\arcgisserver\\directories\\arcgisjobs\\reports\\reporttool_gpserver\\j9300d8c917704b83ae6978b21f3c359e\\scratch\\2a7f372c-b44a-11ee-9509-5c80b6f38693.pdf
When I look into this folder, the pdf is already deleted. The arcgisoutput folder of this service is also empty.
Another issue is that we would ideally use the report file (rptx) instead of the template (rptt), so that we don't have to specify the field names in the request. Using the rptx in the print service, the tool takes forever to complete and eventually times out. During this time we get a lot of requests on the specified feature service and the pdf in the scratch folder of the job get very large, so I can only assume that the definition expression on the feature service is ignored in this case.
Anyone else tried this and experiences the same or can help?
I ran into a similar issue where I created a custom print service to handle secured services. It stopped working and we spent weeks troubleshooting. For us the MAP_ONLY option would only ouput a URL. Checking the output folders they were always empty. Interestingly enough we could sometimes get it working if we changed the ESRI basemap that was displayed.
The Dev tools always had the same error message. It was something like ERR_Connection.
The fix for us was an ESRI printing patch that was released.
Hi Daniel,
thanks for the response. We are already on 11.2, so this bug should be fixed in this version according to https://support.esri.com/en-us/bug/print-services-fail-when-a-print-request-includes-both-bug-000157.... Another patch seems to be coming soon, maybe this will fix the other issues.
thanks for reporting this issue and sorry for the inconvenience.
issue #1 --> we are working on providing a resolution as a patch very soon.
issue #2 --> can you pls look into the large string that gets passed as a value for webmap_as_json parameter? and check if you see definition query is set the layer that you are using as a source to your report?
Thanks for the response, good to hear a patch will come soon.
As for the second issue, I tested a request with only one operational layer that serves as the data source and has a definition expression. The expression works when I use the rptt, but not when I use the rptx.
That is pretty odd that def query is not getting honored when you use rptx. I just tested on my side, and it worked. Would mind reach out to Esri Support and open an incident?
thanks
the good news is that the patch is released today. please apply this patch on your 11.2 server and this should resolve your issue #1 you mentioned above. As I mentioned I was not able to reproduce #2.
https://support.esri.com/en-us/patches-updates/2023/arcgis-server-11-2-map-and-print-service-patch
Pls make sure you don't have ArcGIS Pro 3.2 on the same machine. We are aware of some issues with regards to print service, when both Pro and Server are installed on the same machine.