I have a requirement to provide several CSV downloads from a partner portal. Several of these are fairly short and summarize a lot of detail; I will generate these using VF & Apex. A couple, however, are essential detail dumps, and have the potential to get pretty large. Using a custom report type to customize column headers, I have designed a report that produces the correct csv when exported, and I can generate a direct link to the report's csv download using a combination of url params to specify the export and url params to specify filter criteria.
However, I have an additional requirement to include what is essentially "header" information at the top of the file, containing a few values based of the filter params. I have yet to find any way to include anything in an exported report except detail rows. Am I missing anything? This doesn't have to be complex - I'd even be happy pre-calculating the extra values and passing it in as a param, but I need it to be an additional row, not additional columns on every row. Is this possible? I've considered adapting @eyescream's brilliant method of attaching reports to email and writing an apex method to grab the report and add the extra line on the fly, but I'm concerned that I might exceed the heap size limit (which is why I went with a report in the first place).
Additional Details: The custom report type relates three objects (A with at least one B, B with at least one C), and the report itself is a basic tabular format report.