title: SSRS: extra blank page for hidden data region (subreport wrapped in Rectangle) in PDF exported file
body: <p>Ok, below is the code for main report <strong>"Dummy.rdl"</strong></p>
  
  <p>It has A4 size body and two subreports inside: <strong>"Dummy_A4Sub1.rdl"</strong>, <strong>"Dummy_A4Sub2.rdl"</strong>
  Both subreports also have A4 size bodies and are wrapped by <strong>"Rectangle1"</strong> and <strong>"Rectangle2"</strong> respectively  within main report.</p>
  
  <p>Despite that "Hidden" property within "Visibility" tag is set "True" for both <strong>"Dummy_A4Sub2"</strong> and <strong>"Rectangle2"</strong> data regions, an extra page is being generated at the end.</p>
  
  <p>Any suggestions? What have I missed?
  Thanks in advance!</p>
  
  <p><strong>"Dummy.rdl"</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"&gt;
    &lt;Body&gt;
      &lt;ReportItems&gt;
        &lt;Rectangle Name="Rectangle1"&gt;
          &lt;ReportItems&gt;
            &lt;Subreport Name="Subreport1"&gt;
              &lt;ReportName&gt;Dummy_A4Sub1&lt;/ReportName&gt;
              &lt;Height&gt;5.845in&lt;/Height&gt;
              &lt;Width&gt;8.27in&lt;/Width&gt;
              &lt;Style&gt;
                &lt;Border&gt;
                  &lt;Style&gt;None&lt;/Style&gt;
                &lt;/Border&gt;
              &lt;/Style&gt;
            &lt;/Subreport&gt;
          &lt;/ReportItems&gt;
          &lt;KeepTogether&gt;true&lt;/KeepTogether&gt;
          &lt;Height&gt;5.845in&lt;/Height&gt;
          &lt;Width&gt;8.27in&lt;/Width&gt;
          &lt;Style&gt;
            &lt;Border&gt;
              &lt;Style&gt;None&lt;/Style&gt;
            &lt;/Border&gt;
          &lt;/Style&gt;
        &lt;/Rectangle&gt;
        &lt;Rectangle Name="Rectangle2"&gt;
          &lt;ReportItems&gt;
            &lt;Subreport Name="Subreport2"&gt;
              &lt;ReportName&gt;Dummy_A4Sub2&lt;/ReportName&gt;
              &lt;Height&gt;5.845in&lt;/Height&gt;
              &lt;Width&gt;8.27in&lt;/Width&gt;
              &lt;Visibility&gt;
                &lt;Hidden&gt;true&lt;/Hidden&gt;
              &lt;/Visibility&gt;
              &lt;Style&gt;
                &lt;Border&gt;
                  &lt;Style&gt;None&lt;/Style&gt;
                &lt;/Border&gt;
              &lt;/Style&gt;
            &lt;/Subreport&gt;
          &lt;/ReportItems&gt;
          &lt;KeepTogether&gt;true&lt;/KeepTogether&gt;
          &lt;Top&gt;5.845in&lt;/Top&gt;
          &lt;Height&gt;5.845in&lt;/Height&gt;
          &lt;Width&gt;8.27in&lt;/Width&gt;
          &lt;ZIndex&gt;1&lt;/ZIndex&gt;
          &lt;Visibility&gt;
            &lt;Hidden&gt;true&lt;/Hidden&gt;
          &lt;/Visibility&gt;
          &lt;Style&gt;
            &lt;Border&gt;
              &lt;Style&gt;None&lt;/Style&gt;
            &lt;/Border&gt;
          &lt;/Style&gt;
        &lt;/Rectangle&gt;
      &lt;/ReportItems&gt;
      &lt;Height&gt;11.69in&lt;/Height&gt;
      &lt;Style /&gt;
    &lt;/Body&gt;
    &lt;Width&gt;8.27in&lt;/Width&gt;
    &lt;Page&gt;
      &lt;PageHeight&gt;11.69in&lt;/PageHeight&gt;
      &lt;PageWidth&gt;8.27in&lt;/PageWidth&gt;
      &lt;Style /&gt;
    &lt;/Page&gt;
    &lt;AutoRefresh&gt;0&lt;/AutoRefresh&gt;
    &lt;rd:ReportUnitType&gt;Inch&lt;/rd:ReportUnitType&gt;
    &lt;rd:ReportID&gt;85c64ecf-0c52-4234-8ca8-81e36368f77d&lt;/rd:ReportID&gt;
  &lt;/Report&gt;
  </code></pre>
  
  <p><strong>"Dummy_A4Sub1.rdl"</strong> (<strong>"Dummy_A4Sub2.rdl"</strong> is similar)</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"&gt;
    &lt;Body&gt;
      &lt;ReportItems&gt;
        &lt;Textbox Name="Textbox1"&gt;
          &lt;CanGrow&gt;true&lt;/CanGrow&gt;
          &lt;KeepTogether&gt;true&lt;/KeepTogether&gt;
          &lt;Paragraphs&gt;
            &lt;Paragraph&gt;
              &lt;TextRuns&gt;
                &lt;TextRun&gt;
                  &lt;Value&gt;Dummy Subreport1 A4 Size&lt;/Value&gt;
                  &lt;Style&gt;
                    &lt;FontSize&gt;36pt&lt;/FontSize&gt;
                  &lt;/Style&gt;
                &lt;/TextRun&gt;
              &lt;/TextRuns&gt;
              &lt;Style /&gt;
            &lt;/Paragraph&gt;
          &lt;/Paragraphs&gt;
          &lt;rd:DefaultName&gt;Textbox1&lt;/rd:DefaultName&gt;
          &lt;Top&gt;1.24875in&lt;/Top&gt;
          &lt;Left&gt;0.62375in&lt;/Left&gt;
          &lt;Height&gt;1.94792in&lt;/Height&gt;
          &lt;Width&gt;7.09375in&lt;/Width&gt;
          &lt;Style&gt;
            &lt;Border&gt;
              &lt;Style&gt;None&lt;/Style&gt;
            &lt;/Border&gt;
            &lt;PaddingLeft&gt;2pt&lt;/PaddingLeft&gt;
            &lt;PaddingRight&gt;2pt&lt;/PaddingRight&gt;
            &lt;PaddingTop&gt;2pt&lt;/PaddingTop&gt;
            &lt;PaddingBottom&gt;2pt&lt;/PaddingBottom&gt;
          &lt;/Style&gt;
        &lt;/Textbox&gt;
      &lt;/ReportItems&gt;
      &lt;Height&gt;11.69in&lt;/Height&gt;
      &lt;Style /&gt;
    &lt;/Body&gt;
    &lt;Width&gt;8.27in&lt;/Width&gt;
    &lt;Page&gt;
      &lt;PageHeight&gt;11.69in&lt;/PageHeight&gt;
      &lt;PageWidth&gt;8.27in&lt;/PageWidth&gt;
      &lt;LeftMargin&gt;1in&lt;/LeftMargin&gt;
      &lt;RightMargin&gt;1in&lt;/RightMargin&gt;
      &lt;TopMargin&gt;1in&lt;/TopMargin&gt;
      &lt;BottomMargin&gt;1in&lt;/BottomMargin&gt;
      &lt;Style /&gt;
    &lt;/Page&gt;
    &lt;AutoRefresh&gt;0&lt;/AutoRefresh&gt;
    &lt;rd:ReportUnitType&gt;Inch&lt;/rd:ReportUnitType&gt;
    &lt;rd:ReportID&gt;cfe4adb4-64c8-4225-83e2-abe05f3ba706&lt;/rd:ReportID&gt;
  &lt;/Report&gt;
  </code></pre>