Web App Builder reporting widget

27074
41
03-31-2015 03:41 AM
MohammedMogahed
Esri Contributor

I need to create a widget in webappBuilder, to generate a report, that will contain map with its graphical layer, charts, and table.

Is there a widget that does this task, can I use the print widget, customize it and generate output that have this kind of report?

Mohammed Mogahed

41 Replies
RodWoodfordOld
Occasional Contributor III

Just a follow up. It would be useful for any potential WAB report widget to be able to call upon nominated reports eg crystal reports, SQL reports, etc. Obviously the report and map would need a common identifier like the objectid or land parcel identifier, etc.

If this is not possible how about a simple report builder widget that allows the administrator to bring together the nominated map, attributes, chart, etc from a resultant query.

Hope this helps the cause.

Jianxia
Esri Regular Contributor

Report builder widget! Have added your suggestions in the enhancement.

Thanks,

Jianxia

RodWoodfordOld
Occasional Contributor III

Hi Jianxia,

Has ESRI started to progress this widgets development at all?

cheers

Rod

MGSethe
New Contributor II

Hello,

Please share the code for this report with us if not a problem with you.

0 Kudos
SebastianRoberts
Occasional Contributor III

This is a long thread. I may have  misunderstood, but looks like you wanted me to share the code for my custom parcel report.  Here is how I made it happen.

In the eSearch widget, in the _OnSearchFinish function,  if only 1 parcel was selected (the report can only be generated by the print tool if 1 and only 1 parcel is selected), I set a few variables with data to be passed to the report, such as below and then publish this to the print tool:

if(results.features.length ===1){
     var singleAPN = results.features[0].attributes.APN_FORMATTED;
     var Address1 = results.features[0].attributes.ADDRESS;
    this.publishData({
              'target': 'Print',
              'parcel': {"singleAPN":singleAPN,"Address1":Address1,"Address2":Address2}
              },true);
}

In the print widget.js file, I override the onReceiveData function to listen for a target of "Print".  If that data is received, then I query a map service to get all the report elements, and I allow the user to select the "report Layout".  I had to make several modifications in the Print.js and Print\widget.js files, so they are attached here if you really want to dig into it.  All my modifications are commented with 'nevco customization', so you should easily find my changes.  Note that I also added some logic to strip some of the graphics out of the JSON because my print request was too long for our firewall, so just disregard that piece.

GeraldLee_
New Contributor III

I want to second that motion too. I would love to have this Report widget functionality !

Gerald

FrankRoberts
Occasional Contributor III

We had a similar issue for one of our clients.  We ended up developing a GP tool that would allow the end user to either pick a feature on the map or produce a report for all features on the map.  I agree that it would be a handy tool for the WAB, and it is very difficult to make a one work as an out of the box widget.  It is specifically difficult with the layout and such that is needed.  Attached is a sample from the one we created, this tool also embeds images from the attachment in the geodatabase.

GPTool.jpg

Sample Report:

https://dl.dropboxusercontent.com/u/54484896/SiteStrategyReport7-14.pdf

We will likely be getting fancier in future versions of the tool but it is something that the client is very happy with having.

Hope this idea might help some folks,

Frank Roberts

Jianxia
Esri Regular Contributor

Glad to know there is a way around with GP tool. Thanks for sharing Frank! Agree it is challenging in terms of the layout. For the out-of-box widget, we may provide a few predefined layouts. Just a thought in my mind. Your feedback and requirements help drive our design!

Jianxia

ColeAndrews
Occasional Contributor III

Frank-- what have you found to be the best way/process for formatting and styling the report in the GP service used?

0 Kudos
FrankRoberts
Occasional Contributor III

Cole, The formatting and such can be tricky.  It is relatively easy for items that have short values, for example in the report I link to in drop box above the values found in Latitude and Longitude in the report.  The place where you run into issues is with long blocks of text that may need to wrap onto other pages, or when you start formating a table in the report.  Esri has provided a fair amount of code snippets and such for maps books and such.  We have utilized some of this code in our GP tools for our clients.  If you want to reach out to me directly please feel free to do that at froberts at Innvoateteam dot com.

Have a great day!

Frank