SSRS adding a footer row to a table - CSV output

假装没事ソ 提交于 2019-12-11 01:31:16

问题


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:


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!