SSRS Reports - force table to expand to bottom of page

后端 未结 4 1766
死守一世寂寞
死守一世寂寞 2021-02-14 04:28

I\'m trying to create a invoice type report where i have a header, main body with a table (which includes a totals section) and footer.

The problem im getting is, the ta

4条回答
  •  时光说笑
    2021-02-14 04:49

    All of this can be achieved in the report design itself. Here's what you know:

    • The height of the page (P)
    • The height of your static data (S)
    • The height of your header (H)
    • The height of your data row (R)
    • The count of data rows (C)
    • The height of your footer (F)

    So you can work out how big the remaining space is on the page: P - ((C*R) + S + F + H)

    When I was working through my problem, I realised that I needed two 'spacers' for when the space remaining on the page was too small to fit the footer; spacer one filled in the remainder of the page 1 whilst spacer 2 was the available space on page 2 - P - (S + F + H).

    So, you'll need hidden sections in the report to do the height calculations and two detail rows for spacers beneath any other detail rows.

    There's a demo solution I created on GitHub which shows this 'pin-to-bottom' feature in action as well as resetting page numbers for groups, data-driven headers/footers, label translation and international formatting (page size, number formats, etc).

    For this look at Sales Invoice 5.

提交回复
热议问题