# GrapeCity.ActiveReports.Core.Rendering.ReportEval.MakeContext

## Content

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



<h1 id="GrapeCity_ActiveReports_Core_Rendering_ReportEval_MakeContext_" data-uid="GrapeCity.ActiveReports.Core.Rendering.ReportEval.MakeContext*">MakeContext Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_ActiveReports_Core_Rendering_ReportEval_MakeContext_" data-uid="GrapeCity.ActiveReports.Core.Rendering.ReportEval.MakeContext*"></a>
<h4 id="GrapeCity_ActiveReports_Core_Rendering_ReportEval_MakeContext_GrapeCity_ActiveReports_Extensibility_Rendering_IReportInformationService_GrapeCity_ActiveReports_Layout_IPageInformationService_System_Collections_Generic_IReadOnlyDictionary_System_String_System_Object__System_Lazy_GrapeCity_ActiveReports_Expressions_Remote_GlobalDataTypes_Parameters__" data-uid="GrapeCity.ActiveReports.Core.Rendering.ReportEval.MakeContext(GrapeCity.ActiveReports.Extensibility.Rendering.IReportInformationService,GrapeCity.ActiveReports.Layout.IPageInformationService,System.Collections.Generic.IReadOnlyDictionary{System.String,System.Object},System.Lazy{GrapeCity.ActiveReports.Expressions.Remote.GlobalDataTypes.Parameters})">MakeContext(IReportInformationService, IPageInformationService, IReadOnlyDictionary&lt;string, object&gt;, Lazy&lt;Parameters&gt;)</h4>
<div class="markdown level1 summary"><p>Creates an evaluation context with the specified parameters.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static IEvaluationContext MakeContext(IReportInformationService reportInfo, IPageInformationService pageInfo, IReadOnlyDictionary&lt;string, object&gt; customContext = null, Lazy&lt;Parameters&gt; parameters = null)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="GrapeCity.ActiveReports.Extensibility.Rendering.IReportInformationService.html">IReportInformationService</a></td>
      <td><span class="parametername">reportInfo</span></td>
      <td><p>The report information service.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.ActiveReports.Layout.IPageInformationService.html">IPageInformationService</a></td>
      <td><span class="parametername">pageInfo</span></td>
      <td><p>The page information service.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlydictionary-2">IReadOnlyDictionary</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>&gt;</td>
      <td><span class="parametername">customContext</span></td>
      <td><p>Optional custom context fields.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.lazy-1">Lazy</a>&lt;<a class="xref" href="GrapeCity.ActiveReports.Expressions.Remote.GlobalDataTypes.Parameters.html">Parameters</a>&gt;</td>
      <td><span class="parametername">parameters</span></td>
      <td><p>Optional parameters.</p>
</td>
    </tr>
  </tbody>
</table>
<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="GrapeCity.ActiveReports.Core.Rendering.IEvaluationContext.html">IEvaluationContext</a></td>
      <td><p>An instance of <a class="xref" href="GrapeCity.ActiveReports.Core.Rendering.IEvaluationContext.html">IEvaluationContext</a>.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_ActiveReports_Core_Rendering_ReportEval_MakeContext_" data-uid="GrapeCity.ActiveReports.Core.Rendering.ReportEval.MakeContext*"></a>
<h4 id="GrapeCity_ActiveReports_Core_Rendering_ReportEval_MakeContext_GrapeCity_ActiveReports_PageReportModel_Report_GrapeCity_ActiveReports_Core_Rendering_ThemeService_GrapeCity_ActiveReports_Extensibility_Rendering_IReportInformationService_GrapeCity_ActiveReports_ResourceLocator_System_Lazy_GrapeCity_ActiveReports_Expressions_Remote_GlobalDataTypes_Parameters__System_Int32_System_Collections_Generic_IReadOnlyDictionary_System_String_System_Object__" data-uid="GrapeCity.ActiveReports.Core.Rendering.ReportEval.MakeContext(GrapeCity.ActiveReports.PageReportModel.Report,GrapeCity.ActiveReports.Core.Rendering.ThemeService,GrapeCity.ActiveReports.Extensibility.Rendering.IReportInformationService,GrapeCity.ActiveReports.ResourceLocator,System.Lazy{GrapeCity.ActiveReports.Expressions.Remote.GlobalDataTypes.Parameters},System.Int32,System.Collections.Generic.IReadOnlyDictionary{System.String,System.Object})">MakeContext(Report, ThemeService, IReportInformationService, ResourceLocator, Lazy&lt;Parameters&gt;, int, IReadOnlyDictionary&lt;string, object&gt;)</h4>
<div class="markdown level1 summary"><p>Creates an evaluation context for a report.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static IEvaluationContext MakeContext(Report report, ThemeService themeService, IReportInformationService reportInfo, ResourceLocator resourceLocator, Lazy&lt;Parameters&gt; parameters = null, int themeIndex = 0, IReadOnlyDictionary&lt;string, object&gt; customContext = null)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="../MESCIUS.ActiveReports.Core.Rdl/GrapeCity.ActiveReports.PageReportModel.Report.html">Report</a></td>
      <td><span class="parametername">report</span></td>
      <td><p>The report definition.</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">ThemeService</span></td>
      <td><span class="parametername">themeService</span></td>
      <td><p>The theme service.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.ActiveReports.Extensibility.Rendering.IReportInformationService.html">IReportInformationService</a></td>
      <td><span class="parametername">reportInfo</span></td>
      <td><p>The report information service.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="../MESCIUS.ActiveReports.Core.Rdl/GrapeCity.ActiveReports.ResourceLocator.html">ResourceLocator</a></td>
      <td><span class="parametername">resourceLocator</span></td>
      <td><p>The resource locator.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.lazy-1">Lazy</a>&lt;<a class="xref" href="GrapeCity.ActiveReports.Expressions.Remote.GlobalDataTypes.Parameters.html">Parameters</a>&gt;</td>
      <td><span class="parametername">parameters</span></td>
      <td><p>Optional parameters.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">themeIndex</span></td>
      <td><p>The theme index.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlydictionary-2">IReadOnlyDictionary</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>&gt;</td>
      <td><span class="parametername">customContext</span></td>
      <td><p>Optional custom context fields.</p>
</td>
    </tr>
  </tbody>
</table>
<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="GrapeCity.ActiveReports.Core.Rendering.IEvaluationContext.html">IEvaluationContext</a></td>
      <td><p>An instance of <a class="xref" href="GrapeCity.ActiveReports.Core.Rendering.IEvaluationContext.html">IEvaluationContext</a>.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Condition</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></td>
      <td><p>Thrown when <code class="paramref">report</code> is null.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
