# C1.C1Preview.C1PrintDocument.Generate

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_C1Preview_C1PrintDocument_Generate_" data-uid="C1.C1Preview.C1PrintDocument.Generate*">Generate Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_C1Preview_C1PrintDocument_Generate_" data-uid="C1.C1Preview.C1PrintDocument.Generate*"></a>
<h4 id="C1_C1Preview_C1PrintDocument_Generate" data-uid="C1.C1Preview.C1PrintDocument.Generate">Generate()</h4>
<div class="markdown level1 summary"><p>Generates the current document,
using the <a class="xref" href="C1.C1Preview.RefreshModeEnum.html#C1_C1Preview_RefreshModeEnum_RefreshCalculatedValues">RefreshCalculatedValues</a> refresh mode.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public bool Generate()</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function Generate() As Boolean</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.boolean">bool</a></td>
      <td><pre><code>&lt;b&gt;true&lt;/b&gt; if no warnings occurred during document generation,
</code></pre>
<p><b>false</b> if there were warnings (in that case, the <a class="xref" href="C1.C1Preview.C1PrintDocument.Warnings.html#C1_C1Preview_C1PrintDocument_Warnings">Warnings</a> property on the current document
contains the warnings that were issued).</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Preview_C1PrintDocument_Generate_" data-uid="C1.C1Preview.C1PrintDocument.Generate*"></a>
<h4 id="C1_C1Preview_C1PrintDocument_Generate_C1_C1Preview_RefreshModeEnum_" data-uid="C1.C1Preview.C1PrintDocument.Generate(C1.C1Preview.RefreshModeEnum)">Generate(RefreshModeEnum)</h4>
<div class="markdown level1 summary"><p>Generates the current document.
Depending on the specified refresh mode, may update data-bound and calculated values.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public bool Generate(RefreshModeEnum refreshMode)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function Generate(refreshMode As RefreshModeEnum) As Boolean</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="C1.C1Preview.RefreshModeEnum.html">RefreshModeEnum</a></td>
      <td><span class="parametername">refreshMode</span></td>
      <td><p>A <a class="xref" href="C1.C1Preview.RefreshModeEnum.html">RefreshModeEnum</a> value indicating what data should be refreshed during generation.</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="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><pre><code>&lt;b&gt;true&lt;/b&gt; if no warnings occurred during document generation,
</code></pre>
<p><b>false</b> if there were warnings (in that case, the <a class="xref" href="C1.C1Preview.C1PrintDocument.Warnings.html#C1_C1Preview_C1PrintDocument_Warnings">Warnings</a> property on the current document
contains the warnings that were issued).</p>
</td>
    </tr>
  </tbody>
</table>
</div>
