locked
How to fix the position of controls, so table expands into whitespace and doesn't push lower controls down (invoice report in SSRS 2005) RRS feed

  • Question

  • I am designing an invoice report. There are some controls at the top of the report (company logo, date, invoice number etc), followed by a table listing the items in the invoice, followed by some controls at the bottom (subtotals, returns address etc). The report should always print onto a single page.

    I want the controls at the bottom to have a fixed position on the page. There is sufficient whitespace between these controls and the table above for the table to expand to list many items. However whenever it expands it pushes the lower controls down. This results in them spilling onto a second page.

    Is there a way to fix the position of controls and suppress the "gets pushed down when controls above expand" effect?


    Tuesday, November 3, 2009 12:39 PM

Answers

  • Thanks for that. I found a good solution using rectangles here: SQL Server 2005: Report Design Best Practices and Guidelines

    Here's the relevant part (see underlining):

    Using Rectangles to Keep Objects Together

    Rectangles in Reporting Services can be used either as graphical elements or as containers of objects. As object containers, they keep objects together on a page and control how object move and push each other.

    To keep multiple objects together on a page, put the objects within a rectangle. You can then put a page break before or after the rectangle by using the PageBreakAtStart or PageBreakAtEnd properties for the rectangle.

    Using Rectangles to Control Item Growth and Displacement

    Items within a rectangle become peers of each other and are governed by the rules of how peer items are positioned on the page as they move or grow. For example:

    • Items will push or displace each other within the rectangle.

    • Items will not push or displace items outside the rectangle, because they are not their peers.

    • If necessary, a rectangle will grow to accommodate the items it contains.

    You can use this logic to your advantage when dealing with objects that expand. For example:

    • If you want to leave a blank space in your report for a table to expand into, group the blank space and the table in the same rectangle. When the table grows, it will push the blank space .

    • If you want to prevent a matrix from pushing items off the right edge of the page, put the matrix within a rectangle with blank space to its right. Now, the matrix is no longer a peer to the other item on the page and will not be able to push it until the matrix can no longer be contained within its rectangle.

    Thursday, November 5, 2009 11:23 AM

All replies

  • Hi Laurece,

    Please set the InteractiveSize of the report to be 0in. That the report will be render onto a single page.

    And then, please make sure there does not have a page break for groups in the table.

    Thanks,
    Jin Chen
    Jin Chen - MSFT
    Thursday, November 5, 2009 7:18 AM
  • Thanks for that. I found a good solution using rectangles here: SQL Server 2005: Report Design Best Practices and Guidelines

    Here's the relevant part (see underlining):

    Using Rectangles to Keep Objects Together

    Rectangles in Reporting Services can be used either as graphical elements or as containers of objects. As object containers, they keep objects together on a page and control how object move and push each other.

    To keep multiple objects together on a page, put the objects within a rectangle. You can then put a page break before or after the rectangle by using the PageBreakAtStart or PageBreakAtEnd properties for the rectangle.

    Using Rectangles to Control Item Growth and Displacement

    Items within a rectangle become peers of each other and are governed by the rules of how peer items are positioned on the page as they move or grow. For example:

    • Items will push or displace each other within the rectangle.

    • Items will not push or displace items outside the rectangle, because they are not their peers.

    • If necessary, a rectangle will grow to accommodate the items it contains.

    You can use this logic to your advantage when dealing with objects that expand. For example:

    • If you want to leave a blank space in your report for a table to expand into, group the blank space and the table in the same rectangle. When the table grows, it will push the blank space .

    • If you want to prevent a matrix from pushing items off the right edge of the page, put the matrix within a rectangle with blank space to its right. Now, the matrix is no longer a peer to the other item on the page and will not be able to push it until the matrix can no longer be contained within its rectangle.

    Thursday, November 5, 2009 11:23 AM
  • Thank you for your comment (Using Rectangles to Keep Objects Together). It solved my problem.
    Tuesday, March 24, 2015 7:59 PM