I have recently got involved with a client building a reporting web app on top of legacy applications. I ended up telling them that there were too many uncertainties and we would need to do this on an hourly rate.  Just about wrapped up but still not clear to me whether that was a better but it did protect me when I ran into messy error prone data in the source systems.