0

I currently in between the development of a report. I have set of tables that needs to be hidden incase if values are not present. SSRS Design

As seen in the image, the second set of table should be hidden when there is no data in it. It shows the data obtained from the second row of the table.

=IIF(LOOKUP(2,Fields!RowNo.Value,Fields!SeqNo1.Value,"dsContractReceivablePerc")=0,TRUE,FALSE)

This was the condition that I gave for hiding the table. But after deployment when I viewed my report, I found that even though my table was getting hidden, there was a large empty space left in its space. Empty Space

Could anyone help me out here? Am I missing anything?

4
  • Have you tried putting both tables inside a rectangle? Commented Jun 17, 2015 at 7:35
  • As in a single rectangle or two separate rectangle?
    – Geethu
    Commented Jun 17, 2015 at 8:27
  • A single rectangle containing the 2 tables Commented Jun 17, 2015 at 8:28
  • Before you had posted your second comment, i tried putting a separate rectangle for the second table and it worked :)... Thanks a lot @SébastienSevrin
    – Geethu
    Commented Jun 17, 2015 at 9:16

1 Answer 1

1

To remove the blank space, you can add a rectangle containing the 2 tables. Then if the table is not visible, it will adjust the size accordingly.

The Report Design: Best Practices and Guidelines contains an interesting section called "Useful Tips for Report Design".

This page was published in 2005 but is still applicable.

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.