RDLC Report Hidden rectangles Creates Empty Pages

Rajeev Lohani 21 Reputation points
2021-08-11T08:37:52.517+00:00

I have two sections that needed to be hidden when data is not present. however after adding a new section in the accident info section I am getting the error. My page size is 8.27in, 11.69in. Interactive size is 8in, 11in.

On that section previous height was 7.8 inch now its increased to 8 inch. After substracting header and footer 8.4 inch space is available for the page. if margin is considered only 0.1 inch margin is there for all sides. ConsumeContainerWhitespace is also true.

For some data where these two rectangles are not visible an empty page is generated. This should not be the case as after hiding them from expression widget moves up automatically. On some sections property "PageBreak" is set to BreakLocation=Start. It is because some sections needs to be saved in a new page.

122332-page1.png
122304-page2.png

Kindly help me to resolve the issue, I am stuck. I am using reporting version 8. "http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition"

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
3,064 questions
0 comments No comments
{count} votes

Accepted answer
  1. Joyzhao-MSFT 15,636 Reputation points
    2021-08-12T07:45:20.757+00:00

    Hi @Rajeev Lohani ,
    Do you mean that when you hide the rectangle it will leave blank space? As far as I know, this is by design.
    If I misunderstand what you mean, please feel free to correct me.
    Best Regards,
    Joy


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Rajeev Lohani 21 Reputation points
    2021-10-01T16:35:55.193+00:00

    I would like to thank @Joyzhao-MSFT for the support.
    In this case I tried with only Tablix widget with row visibility and widget visibility based on expression. None of the approach worked. I had got one concept wrong that on hiding the widget or Tablix report takes no space. The report takes space which is between the widgets. I also tried with two different schema as well i.e. RDL 2008 and 2016 but same thing happened on both.
    I posted similar question on Stack Overflow as well : rdlc-report-hidden-rectangles-creates-empty-pages

    What finally worked is that I reduced the rectangle of previous page by a margin of 1 inch excluding padding, page margin and footer for A4 size page. The space between the widgets was 0.5 inch. for hiding two widgets additional space of 1 inch is required, so that a new page doesn't gets generated.

    137043-screenshot-2021-10-01-220459.png

    I still have to find a way out if data increases then the new page doesn't get generated.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.