ArcGIS Blog

Government

ArcGIS Enterprise

Creating a custom print service with reporting capability

By Aziza Parveen

In the February 2024 update of ArcGIS Online, the Experience Builder Print widget added the capability to utilize output data sources for generating dynamic report. This newly added feature requires a custom enterprise 11.3 print service with a reporting template. This blog will provide you a step-by-step guide on creating and publishing a print service that can be used in Experience Builder to generate reports,  and finally we will use this service to recreate Screening widget workflow in Experience Builder.

Here is a sample report for you to explore, To create a report like this, please follow the steps below:

Generate a report template in ArcGIS Pro

In this step you are going to create a report template in ArcGIS Pro that will include all of your layers information in a report format.

Create reports:

  1. Create a new Pro project with Map template
  2. Add data to your map (I added the same hosted feature service that I used in my Experience Builder App).
  3. From the content pane, create a new report by right clicking on a layer and then select New Report from the menu.
  4. Choose a report template. For this sample print service, I chose Attribute List. Click Next. There is another option Use a custom template. If you already have a custom template created, you can use that as well.
  5. Enter a Report name and select Data source (I chose Artificial Reef Site in this sample). Click Next.
  6. Select all rows from Rows dropdown and select fields you want to include in your report. Click Next.
  7. (Optional) Pick a field for Sorting and/or Summary statistics, otherwise accept default options. In my sample report, I did not add any summary statistics.
  8. (Optional) Change the Display and Page Setup options and click Finish.
  9. Now expand both Report header and Page header section from the Contents pane and drag the Report header title text to Page header section. This way the report name appears on top of each page and will not occupy a whole page.
  10. Create another new report the same way you created the first report. For this, you will need (1) to go to the Map tab (2) then select the layer from the Contents pane and right click on New Report and (3) follow the steps from 4 to 9 to complete the setup.

 

For my sample service, I have added 10 additional subreports (Fish spawning site, Bird nest sites, High quality water sites, Sensitive species areas, Critical areas, Conservation areas,  Marine protected areas, Salt marsh areas, Submerged aquatic vegetation and Fish spawning areas).

Create new report in pro

Create a master report

In this step, you will incorporate the reports you created in the previous step as subreports to compose a master report.

  1. Click on the Subreport button from the Insert menu.  Add all the reports you have created in the previous steps this way.
  2. Make sure the Report header section of each subreport is unchecked except the first report.
  3. Next, rename the main report, I named it Environmental analysis report.
  4. Next, remove the data references from each subreport. Easiest way to do this is to remove map from the project, when you remove the map you should see a exclamation symbol in front of the report names. This is an important step since if the print service do not have any results to print, it may look for data in the reference data source and returns incorrect results.

 

Master report with sub reports

Design a cover page for master report

In this step you are going to design a cover page for the master report. You can add your company logo, images and text contents to provide context for your users.

  1. Select the first report from the view window (Artificial Reef Site Report in this sample) you created.
  2. Click on the Report Header from the Contents pane to select it.
  3. Next click on the Report Header tab from the top ribbon and increase the height of this section.
  4. Next click on the Insert tab from the ribbon and insert images (in jpg format), text and style them to create a cover page.

 

Cover page

Create report file

  1. Using File explorer, create a new folder where your rptx file and map templates will reside.
  2. From Share tab in ArcGIS Pro, save it as Report File (rptx file) in that newly created folder.
  3. Copy default map layout templates from C:\Program Files\ArcGIS\Pro\Resources\ArcToolBox\Templates\ExportWebMapTemplates to the folder where your rptx file resides. So all map and report templates are in same place. This is a key step, otherwise your printed report will not have any map.
  4. From Analysis tab, click on Tools button to open the Geoprocessing pane.
  5. Search Export Web Map tool, accept the default values for all parameters except Template folder, point it to the new folder where your rptx file and all map templates reside, then run the tool.
  6. Similarly run the Get Layout Templates Info and Get Report Templates Info tool pointing template folder to your templates folder.

 

Publish the service

Make sure you are logged in to a Enterprise 11.3 portal with Administrator privilege to publish this custom print service.

  1. Next, go to the History tab from geoprocessing pane and right click on the Export Web Map tool and click on Share as then Share Web tool.
  2. Optionally change the name of the tool.
  3. Make sure that Share with Everyone option is checked.
  4. Click on the Configuration tab, If you have only few layers, it is recommended to use the Synchronous mode. However, if you have many layers, it is recommended to use the Asynchronous mode to avoid timeout issue. In my case, since I have 11 layers, I used the Asynchronous mode.
  5. Click on the Content tab, then click on Add Tool and add Get Report Template Info and Get Layout Templates Info one by one.
  6. Then Analyze and Publish the service.

Now your custom print service is ready to be used in Experience Builder. Please visit this blog to learn how to configure this service in Experience Builder to generate dynamic reports.

 

Share web tool

Related resources:

Share this article

Subscribe
Notify of
13 Comments
Oldest
Newest
Inline Feedbacks
View all comments
Anthony Jones(@anthony-jones_rsk_epd-2-2-2-2)
June 6, 2024 1:36 am

Hi Aziza, thanks for the article, this is great functionality and I’ve learned today that you can create a print service from ArcGIS Pro. However, as you will not be surprised to see someone ask, are there any plans to allow us to host custom print services in ArcGIS Online? We can potentially get access to Enterprise but in conversations with our Esri account managers they’ve generally tried to steer us away from this and suggest the use of AGOL instead. So when we see functionality like this that isn’t available in AGOL it’s a bit frustrating. Any updates would… Read more »

Patrice Labbé(@patlab7)
October 7, 2024 6:03 am
Reply to  Aziza Parveen

Hi Aziza,

Any news about reports in Near Me in ArcGIS Enterprise? Or a Feature Report widget for regular Feature Services? Or any upcoming support for Map Services in both? We really need reporting capabilities built-in in ExB for ArcGIS Enterprise.

Jay Guarneri(@guarnerij)
June 11, 2024 11:17 am

Aziza,

Thanks for the great article! What would be the workflow if we only wanted a report with no maps? That’s actually a more common request at our organization, and I’d love to set a lot of those up for self-service.

Oskar Penje(@oskar-penje)
October 4, 2024 7:47 am

Hi Aziza, thanks for providing a detailed workflow for publishing report templates to portal for use in webapps. I am wondering when we will have the capability of printing reports from selected features (and related records) in experience builder.

Santiago Hoyos(@shoyoseche)
November 20, 2024 3:53 pm

Thank you, Aziza, for this tutorial. I have been following the instructions here presented and have encountered the following issues: 1. Each Subreport starts with a new page which created excessive paperwork for a tool that has 7 layers with 7 subreports and each has one or two records per table. Is there a way to prevent the page jump between subreports? 2. The printing times of the tool when working with multiple layers are too slow, it takes the printing tool around 2 minutes to print which can be very frustrating for users. I have been trying to optimize… Read more »

John Bocan(@jbocan)
December 17, 2024 1:30 pm

Thank you, Aziza, for the excellent tutorials on creating a custom print service with reporting and for implementing it in Experience Builder. I’ve been mostly successful in implementing my own. I have an issue when I try to remove the data references as described in Step 4 of “Create a master report”. You mention that the easiest way to remove the data references from the project is to remove the map. It seems this is successful when I have about 5 layers. More than that, when I remove the map it seems that the data sources remain (I do not get the little red “exclamation… Read more »

Last edited 5 months ago by John Bocan
Emilia Walton(@emilia-waltonscrd-ca_myscrd)
April 14, 2025 4:10 pm

Can this be published to a stand-alone ArcGIS Server 11.3 site?
How is this different from the workflow outlined here, that worked in older versions of ArcGIS Enterprise?
https://www.esri.com/arcgis-blog/products/arcgis-enterprise/mapping/print-reports-from-arcgis-enterprise-web-apps

We are holding at 11.1 due to other integrations.