# C1.Report.FlexReport.AvailableHeight

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Report_FlexReport_AvailableHeight_" data-uid="C1.Report.FlexReport.AvailableHeight*">AvailableHeight Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Report_FlexReport_AvailableHeight_" data-uid="C1.Report.FlexReport.AvailableHeight*"></a>
<h4 id="C1_Report_FlexReport_AvailableHeight" data-uid="C1.Report.FlexReport.AvailableHeight">AvailableHeight</h4>
<div class="markdown level1 summary"><p>Gets the height of the remaining area available for sections on the current page.
This property can only be used while the report is being rendered in paginated mode (i.e. when <a class="xref" href="../C1.Document/C1.Document.C1DocumentSource.IsBusy.html#C1_Document_C1DocumentSource_IsBusy">IsBusy</a> and <span class="xref">C1.Document.C1DocumentSource.Paginated</span> are true).
If <a class="xref" href="../C1.Document/C1.Document.C1DocumentSource.IsBusy.html#C1_Document_C1DocumentSource_IsBusy">IsBusy</a> is false then -1 is returned. If <span class="xref">C1.Document.C1DocumentSource.Paginated</span> is false then double.MaxValue is returned.
Note that if used in OnPrint/OnFormat scripts, this value does NOT account for the current section's height.
For subreports this property returns <a class="xref" href="C1.Report.FlexReport.AvailableHeight.html#C1_Report_FlexReport_AvailableHeight">AvailableHeight</a> of the master report.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[Browsable(false)]
public double AvailableHeight { get; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;Browsable(False)&gt;
Public ReadOnly Property AvailableHeight As Double</code></pre>
</div>
<h5 id="C1_Report_FlexReport_AvailableHeight_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Here is an example of code which can be used in the detail section's OnFormat script
to determine whether the current detail section will be the last one printed on the page
(the test checks that the current section will fit onto the page while the next section won't):</p>
<pre><code class="lang-csharp">h = Detail.RenderHeight
ah = Report.AvailableHeight
if (h &lt; ah) and (2 * h &gt; ah) then
  Detail.BackColor = RGB(255, 0, 0) ' last on page
else
  Detail.BackColor = RGB(255, 255, 255)
endif</code></pre>
</div>
</div>
