# C1.Report.FlexReport.OnNoData

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Report_FlexReport_OnNoData_" data-uid="C1.Report.FlexReport.OnNoData*">OnNoData Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Report_FlexReport_OnNoData_" data-uid="C1.Report.FlexReport.OnNoData*"></a>
<h4 id="C1_Report_FlexReport_OnNoData" data-uid="C1.Report.FlexReport.OnNoData">OnNoData</h4>
<div class="markdown level1 summary"><p>Gets or sets the <b>VBScript</b> that is executed when the report starts rendering and its source recordset is empty.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[C1Category(&quot;Script&quot;)]
[C1Description(&quot;C1FlexReport.OnNoData&quot;, &quot;Script executed if the report has no data.&quot;)]
[Browsable(false)]
public string OnNoData { get; set; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;C1Category(&quot;Script&quot;)&gt;
&lt;C1Description(&quot;C1FlexReport.OnNoData&quot;, &quot;Script executed if the report has no data.&quot;)&gt;
&lt;Browsable(False)&gt;
Public Property OnNoData As String</code></pre>
</div>
<h5 id="C1_Report_FlexReport_OnNoData_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The control also fires the <a class="xref" href="C1.Report.FlexReport.NoData.html">NoData</a> event at this time.</p>
<p>The difference between the regular event and the VBScript property is that the handler for the regular event 
belongs to the application, and should thus be used to support tasks that are independent of the report.
For example, to cancel rendering reports with no data.</p>
<p>The VBScript handler in the property belongs to the report, and will be executed regardless of the application.
For example, a report might contain a VBScript handler that changes the value of a field when the source recordset is 
empty.</p>
</div>
</div>
