Kavin avatar image
Kavin asked

How to eliminate Extra commas at the end in CSV file,which exported from SSRS

I'm just Exporting SSRS report to CSV format,where i'm getting extra commas at end of each record as CSV Format: 274,98027,Issaquah 274,502097814,M 43849,SO43849, 44082,SO44082, 44508,SO44508, 44532,SO44532, **The extra comma appearing at end of rows in "CSV format",for the rows which has NULL values at end in the "Report"** Report Format: 274 98027 Issaquah 274 502097814 M 43849 SO43849 NULL 44082 SO44082 NULL 44508 SO44508 NULL 44532 SO44532 NULL Is there any solution to hide extra comma in CSV format? plz suggest solution for this. Thanks in advance..
ssrs-2008ssrs-2008-r2reporting_servicesssrs bidsssrs-subscription
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

KenJ avatar image KenJ commented ·
The comma doesn't really look like it's 'extra' since there is a column that comes after it. If that column is always null, can you just remove it from the report? The columns in the report/CSV look like they hold different things - maybe each type of row could go into its own csv?
0 Likes 0 ·
Sule avatar image Sule commented ·
Like KenJ said before, comma at the end of row in your csv is for reason. Csv formated like this is correct, and if you do any operation with that csv file, it'll work. But if you delete commas at the end of some rows, in that case your csv will differ from your real data in database.
0 Likes 0 ·
Kavin avatar image Kavin commented ·
thx for reply.Yah as if for our requirement.we did query in recursive CTE .where first row from different statement and second,third(with different no. of columns in select).i have hided the null value columns in the report.and that columns are not there any other solution available?plz suggest..
0 Likes 0 ·

0 Answers


Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.