views:

1781

answers:

2

Hi,

I have a simple table in SSRS which I am using to create a CSV report. The output looks like:

a,b,c
1,2,3
4,5,6
where a,b,c are the column headers. Now my client requires a footer row saying how many records are in the file. However if I add a row to my table with the required fields in, the output becomes:
a,b,c,records
1,2,3,2
4,5,6,2
instead of:
a,b,c
1,2,3
4,5,6
records,2
Does anyone know how I can achieve the desired effect?

+1  A: 

In SSRS 2005, the table control has, by default, three rows. The top one is for a header, the bottom one is for footer, and the middle one is for data. Looking at your example, it appears you dragged the records value into a new column in the middle row, and it automatically added a header for you.

Instead, drag it into the bottom row. You can type "records" into the leftmost column of the footer, and whatever data set field you have for the records count into the 2nd column.

In SSRS 2008, you have the Tablix control. It defaults to a Header row and a Data row. Right-click on the data row, and select Insert Row -> Outside Group - Below. Then you have a footer row that you can add to the same way was in SSRS 2005.

Dave Bauman
That's what I did (Insert Row -> Outside Group - Below) - everything appears correctly in the report preview.It's when exporting to CSV that it appears differently.
A: 

The effect you're trying to achieve is not possible but you can get rid of that column. Select the row you use as Footer, actually the textbox associated and set the DataElementOutput for that textbox to NoOutput. That row will not be exported in CSV. This applies to any textboxes in a report.

Daniel C