Sunday, February 19, 2012

Export to CSV fails with 3rd party web app

From my web application, exporting to Excel works fine, but when I export to CSV and open with Excel I get 2 garbage characters. I can export the report just fine from the ReportServer.

Is there something special that needs to be done? Could I have an old file?

Could it be something in my report? We always have the following components:
-- textboxes in the page header and footer
-- page header refers to parameter values; page footer refers to globals
-- 2 date parameters and 1 hidden boolean parameters

We're running SQL 2005 Reporting Services, and I have SP2 installed.

(I write the reports, not the web app)

?t

The export failed from SSRS, so the issue is not in the ReportViewer control.
It turns out a report parameter and a field in the dataset had the same name.
SELECT *, bad=@.bad FROM Employees

Changing the parameter name fixed it.
SELECT *, bad=@.notBadAtAll FROM Employees

No comments:

Post a Comment