# C1.Report.DataSource.MaxRecords

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Report_DataSource_MaxRecords_" data-uid="C1.Report.DataSource.MaxRecords*">MaxRecords Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Report_DataSource_MaxRecords_" data-uid="C1.Report.DataSource.MaxRecords*"></a>
<h4 id="C1_Report_DataSource_MaxRecords" data-uid="C1.Report.DataSource.MaxRecords">MaxRecords</h4>
<div class="markdown level1 summary"><p>Gets or sets the maximum number of data rows to be included in the report (zero includes all rows).</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[C1Category(&quot;Data&quot;)]
[C1Description(&quot;DataSource.MaxRecords&quot;, &quot;The maximum number of data rows to be included in the report (zero includes all rows).&quot;)]
public int MaxRecords { get; set; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;C1Category(&quot;Data&quot;)&gt;
&lt;C1Description(&quot;DataSource.MaxRecords&quot;, &quot;The maximum number of data rows to be included in the report (zero includes all rows).&quot;)&gt;
Public Property MaxRecords As Integer</code></pre>
</div>
<h5 id="C1_Report_DataSource_MaxRecords_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This property is useful if you want to limit the size of a report. For example, you may write a report 
designer with a preview window that shows only the first 500 records from the database.</p>
<p>Setting this property to zero causes the control to retrieve all records.</p>
<p>You can also limit the size of reports by setting the <a class="xref" href="C1.Report.FlexReport.MaxPages.html#C1_Report_FlexReport_MaxPages">MaxPages</a> property.</p>
</div>
</div>
