I know this isn't the kind of answer that you are looking for, but something to be aware of in offering for-fee services using ArcGIS Server is prohibited unless you have a "Commercial ASP Use License" (as referred to in the 9/22/2016 version of the Esri License and Services Agreement, section 2.2:
a. Customer may:
6. Use server Software for Commercial ASP Use if Customer has procured a Commercial ASP Use license or is a governmental or not-for-profit organization that operates a website or offers an Internet service on a cost-recovery basis and not for profit.
The reason I'm painfully aware of this is that I have a client who was offering for-fee PDF reports from a ArcGIS Server-hosted Web Application Builder application, without the requisite ArcGIS $$$erver Commercial ASP Use License, and had to do some backtracking. Granted, it's rare to be detected but the point is that you can use ArcGIS software internally to make money for your company, but you can't offer to rent it out, as it were. Just a word of caution in your enterprise. If I'm jumping in unadvisedly, I apologize.
Having said all that, it is straightforward to create a WAB that produces formatted reports from a geoprocessing script.
This is not something we will be selling at first. I said clients, but the end users will be part of our organization for the time being. Down the road we will offer these products publicly and we will make sure that we have the proper licenses.
I'm trying to figure out how to run external Python and Visual Basic scripts from a click event in a map service. The Python script extracts raster data using ArcPy and converts it to csv. A VB script then creates a chart from this csv data in Excel. I know that this can be done with PHP, but I'm unsure of how to integrate this process in the map.
Good clarification, Lloyd, thanks. Regarding your question about calling
Python scripts from a map service, check out this GIS StackExchange link: