I have seen something similar in some other thread. You will probably find some parts of that article helpful, not everything of course, but I still think it's worth looking into. 
http://www.asukasushiny.com/specialized-on-line-report-producing-service