Hello,
A FIVEWIN desktop program on the server does the hard work.
This program monitors a directory. A PHP program writes a text file to this directory.
In the text file the report request is stored.
The FIVEWIN program prepares all the data for the report and stores the data in a CSV file.
Then the PHP program shows the report.
I found a very impressive PHP reporting tool.
https://www.koolreport.com/
Best regards,
Otto