I set something similar up in my Flex Viewer version for a parcel report, and hope to do it with WAB if nothing better becomes available before I get to it. Here are the general steps I followed.
- I created an mxd with a map, and lots of dynamic text such as zoning, school district, etc., that constitute the "report elements". For example the zoning text element is: <dyn type="document" property="ZONING" emptyStr = "Not available"/>. This is then published as a print service.
- My parcel search tool (in the WAB I would modify Robert Scheitln's eSearch widget) publishes property related attributes if only one parcel is selected. When the print widget is opened, if data has been published by eSearch, then the user can choose a "parcel report" layout from the print options. Then the print widget needs to be modified to build the JSON to send the property data with the print request. Below is a partial example of the Json. The customTextElements portion is what sends the property characteristics that will then populate the report fields.
Here is an example of the PDF that is output. In this case the report is pretty simple, but there is no reason you couldn't add more elements. I don't know how you would do a multipage report using this method though. Also, I had an issue with our Firewall blocking the http POST request at first, because it gets pretty long with all those text parameters.