# GrapeCity.ActiveReports.Document.PageDocument.Parameters

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_ActiveReports_Document_PageDocument_Parameters_" data-uid="GrapeCity.ActiveReports.Document.PageDocument.Parameters*">Parameters Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_ActiveReports_Document_PageDocument_Parameters_" data-uid="GrapeCity.ActiveReports.Document.PageDocument.Parameters*"></a>
<h4 id="GrapeCity_ActiveReports_Document_PageDocument_Parameters" data-uid="GrapeCity.ActiveReports.Document.PageDocument.Parameters">Parameters</h4>
<div class="markdown level1 summary"><p>Gets the collection of parameters defined in the report.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public ParameterCollection Parameters { get; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</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="GrapeCity.ActiveReports.Document.ParameterCollection.html">ParameterCollection</a></td>
      <td><p>A <a class="xref" href="GrapeCity.ActiveReports.Document.ParameterCollection.html">ParameterCollection</a> containing the parameters for the current report.
Returns <code>null</code> if the report processor is not initialized.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_Document_PageDocument_Parameters_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>
This property provides access to the report parameters, allowing you to get or set their values 
before the report is rendered.
</p>
</div>
<h5 id="GrapeCity_ActiveReports_Document_PageDocument_Parameters_examples">Examples</h5>
<p>This example demonstrates how to access parameters and set their values using the collection.</p>
<pre><code class="lang-csharp">// Load a page report
PageReport pageReport = new PageReport(new FileInfo("Report1.rdlx"));
pageReport.Document.Load();

// Check if parameter exists before accessing
if (pageReport.Document.Parameters.Contains("EmployeeID"))
{
    var singleParam = pageReport.Document.Parameters["EmployeeID"];
    // Scenario A: Setting a value for a single-value parameter
    singleParam.CurrentValue = 12345;
}

if (pageReport.Document.Parameters.Contains("Regions"))
{
    var multiParam = pageReport.Document.Parameters["Regions"];
    // Scenario B: Setting values for a multi-value parameter
    multiParam.CurrentValue = new string[] { "North", "South" };
}

// 3. Iterating through parameters
foreach (var param in pageReport.Document.Parameters)
{
    Console.WriteLine($"Name: {param.Name}, Value: {param.CurrentValue}");
}</code></pre>

</div>
