Yes You can export to CSV with spaces in the column header. Here is how I did it.
Step 1
Update the report dataset to include the headers on line 1.
SELECT * FROM ( SELECT Field1, Field2, 2 as rowOrder FROM Tables Where Conditions UNION ALL SELECT 'Activity Date' AS Field1, 'Expiry Date' AS Field2, 1 as rowOrder ) ORDER BY rowOrder
Step 2:
Modify the RSReportServer.config file on the report server to configure CSV export to exclude the header.
2012 config file Location: C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\ReportServer
2008 File Location: \Program Files\Microsoft SQL Server\MSSQL.n\Reporting Services\ReportServer
Imp: Make a backup of RSReportServer.config if you need to undo the changes.
Add another entry in the <render> section under the CSV extension.
<Extension name="CSVNoHeader" Type="Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering"> <OverrideNames> <Name Language="en-US">CSV No Header</Name> </OverrideNames> <Configuration> <DeviceInfo> <NoHeader>true</NoHeader> </DeviceInfo> </Configuration> </Extension>
Save it. Now you have another option to export down CSV No Header along with CSV, PDF, XML. Users can use this option to retrieve data in CSV with spaces in the header.
MSDN link to configure rendering extension
Anup agrawal
source share