reporting-servicesfooterrepeatssrs-tablix

How to repeat single SSRS tablix footer on every page


I am new to SSRS and the report builder.

I have the following report that has a row group with a header and several footer rows. I need to repeat one of the footer rows on every page but when I do this I get an error saying the preceding rows also have to repeat on every page.

I want to other footer static rows to only appear on the last page of the grouping, but I want my last footer static row to repeat on every page.

I can not have this data be in a PAGE footer as it contains data related to the group I am focusing on.

The row I am trying to repeat on every page is outlined in red. I also included an image of the error.enter image description here enter image description here


Solution

  • SSRS is a real pain when it comes to doing things like this. Whilst it might be possible, I would avoid all the stress and approach this differently.

    As each page has a finite number of rows it can handle, I would calculate and add a pagenumber value to each row of data in the datasetquery. For example, if the dataset contain 18 rows of data, row 1-5 would have pagenumber=1, 6-10 would be 2, 11-15=3 and 16-18=4.

    I would then create a subreport that looks like the body of the report but that only produced a single page. The subreport would accept a page number parameter @pagenum and the dataset query within that subreport would filter the data to that single page.

    You can add the "footer" table to this sub report as I think you implied that it only relates to the data on that page anyway.

    Once this is done, in your main report, add a dataset that has a simple list of page numbers which you can calculate from your data. For example, if you page could handle 5 rows of data and the entire dataset was 18 rows, this pagenumbers dataset would contain a list of values 1,2,3 & 4.
    Then, add a simple table with a single column that is the full width of your report, assign the pagenumbers dataset, so keeping with the example, this will give use 4 rows. In the table, insert a subreport and set the subreport property to the subreport you created earlier. Within that subreport control (in the table on the main report) set the subreport's parameters as required making sure you set the pagenumber parameter ( @pagenum ) to the pagenumber field from the pagenumbers dataset.

    Finally you can add the "last page footer" to the end of the main report so it only appears once.