Create a Custom Reporting widget for WAB

433
4
08-14-2021 07:26 AM
by Anonymous User
Not applicable

Hi All,

i would like to create custom reporting widget where user will select parcel on the map based upon we need to get the info from related layers and need to generate a pdf with parcel info and map. kindly suggest how to generate reports. below are the examples

example 1

Naveen_ReddyBeti_0-1628951001273.png

example 2

 

Naveen_ReddyBeti_1-1628951102415.png

 

 

 

0 Kudos
4 Replies
LongDinh
Occasional Contributor II

Hi @Anonymous User ,

To develop Widgets, you can get started by following the developer notes here. There are tutorials, deployment guides and development patterns mentioned through out the notes.  

To customise widgets, you will need an understanding of JavaScript for front-end and possibly Python for back-end geoprocessing server developments.

Hope this helps!

0 Kudos
by Anonymous User
Not applicable

Hi @LongDinh ,

Thanks for the reply. I have been working on this customize widgets from past 3 years.

I have been confused how to generate the pdf with map and table data as there alot of third party apis where i can export html data to pdf. but in my case i need to use only javascript api and gp services. could you please let me know the way or idea how to generate the reports. 

0 Kudos
LongDinh
Occasional Contributor II

Hi @Anonymous User,

I assume you have access to administrating an ArcGIS Enterprise.

A simple workflow for your custom widget may be:

  1. Select Features,
  2. Send Queries to GET data,
  3. Summarise/Aggregate JSON data,
  4. Send JSON data to GPService,

Your GPService will then output the pdf from the JSON data. Note, step 2-4 above can be omitted and completed in the GPService if your data is large (i.e. the client application is slow to execute the queries/aggregations).

For PDF reporting, you will need to install a 3rd party Python modules to your Server framework's python. See Deploying custom Python packages for ArcGIS Server . Modules which you might consider for building your PDF from the JSON data are:

  • LaTeX,
  • ReportLab,
  • PyPDF,
  • Pdfkit... 

There are many more. You should probably try see which modules you like best before installing a module on your server.

As for Maps, you can use the ExportMap REST operation which native in all MapServers or customise and deploy a layout to a printing service by following these instructions.

 

0 Kudos
LefterisKoumis
Regular Contributor
Did you try the screening widget? You can specify which fields to include
in the report from one or more layers.
0 Kudos