# C1.Report.FlexReport.NoData

## Content

<div class="doc-site-dotnet-api-container">




<h1 id="C1_Report_FlexReport_NoData" data-uid="C1.Report.FlexReport.NoData" class="text-break">NoData Event
</h1>
<div class="markdown level0 summary"><p>Occurs when the report starts rendering and the main report data source is empty.</p>
</div>
<div class="markdown level0 conceptual"></div>
<h6><strong>Namespace</strong>: <a class="xref" href="C1.Report.html">C1.Report</a></h6>
<h6><strong>Assembly</strong>: C1.Report.dll</h6>
<h5 id="C1_Report_FlexReport_NoData_syntax">Syntax</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[C1Description(&quot;C1FlexReport.NoData&quot;, &quot;Occurs when the report starts rendering and the main report data source is empty.&quot;)]
public event EventHandler NoData</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;C1Description(&quot;C1FlexReport.NoData&quot;, &quot;Occurs when the report starts rendering and the main report data source is empty.&quot;)&gt;
Public Event NoData As EventHandler</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.eventhandler">EventHandler</a></td>
      <td>Occurs when the report starts rendering and the main report data source is empty.</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Report_FlexReport_NoData_remarks"><strong>Remarks</strong></h5>
<div class="markdown level0 remarks"><p>You can use this event to cancel rendering a report when the source recordset is empty.</p>
<p>If you don't cancel the report, it will be rendered as an unbound report (a self-contained report 
with no underlying data).</p>
</div>
<h5 id="C1_Report_FlexReport_NoData_examples"><strong>Examples</strong></h5>
<p>The code below cancels a report when it has no data:</p>
<pre><code class="lang-csharp">private void c1r_NoData(object sender, EventArgs e)
{
    _c1r.Cancel = true;
}</code></pre>

</div>
