• Why not just use MS SQL Reporting Services or Crystal reports (what ever you reporting tool is) to generate a report, you can have input parameters, the report can use a SQL query as the source.. The results can be exported as a csv, as well as other formats. Generating a ASP page seems to be overkill.