问题
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,6where 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,2instead of:
a,b,c 1,2,3 4,5,6 records,2Does anyone know how I can achieve the desired effect?
回答1:
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.
回答2:
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.
回答3:
In SSRS 2008 , Click on the Report Tab on the top menu . Then select "Add Page Footer"
来源:https://stackoverflow.com/questions/1044219/ssrs-adding-a-footer-row-to-a-table-csv-output