# C1.Report.DataSource.RecordSource

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Report_DataSource_RecordSource_" data-uid="C1.Report.DataSource.RecordSource*">RecordSource Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Report_DataSource_RecordSource_" data-uid="C1.Report.DataSource.RecordSource*"></a>
<h4 id="C1_Report_DataSource_RecordSource" data-uid="C1.Report.DataSource.RecordSource">RecordSource</h4>
<div class="markdown level1 summary"><p>Gets or sets a string that specifies which table, stored procedure, or Sql command
to use for retrieving the report data.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[Browsable(false)]
[C1Category(&quot;Data&quot;)]
[C1Description(&quot;DataSource.RecordSource&quot;, &quot;The SQL statement, the name of a table or view, or the name of a stored procedure.&quot;)]
public string RecordSource { get; set; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;Browsable(False)&gt;
&lt;C1Category(&quot;Data&quot;)&gt;
&lt;C1Description(&quot;DataSource.RecordSource&quot;, &quot;The SQL statement, the name of a table or view, or the name of a stored procedure.&quot;)&gt;
Public Property RecordSource As String</code></pre>
</div>
<h5 id="C1_Report_DataSource_RecordSource_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The <a class="xref" href="C1.Report.DataSource.ConnectionString.html#C1_Report_DataSource_ConnectionString">ConnectionString</a> specifies the database that contains the report data. 
The <a class="xref" href="C1.Report.DataSource.RecordSource.html#C1_Report_DataSource_RecordSource">RecordSource</a> property specifies which table, stored procedure, or Sql command to use for 
retrieving the data.</p>
<p>If you want to use a different type of connection (e.g. System.Data.SqlClient.SqlConnection,
or if your application already has the data available in a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.data.datatable">DataTable</a> object, you can assign the 
data directly to the <a class="xref" href="C1.Report.DataSource.Recordset.html#C1_Report_DataSource_Recordset">Recordset</a> property.</p>
</div>
</div>
