# C1.Report.FlexReport.OnOpen

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Report_FlexReport_OnOpen_" data-uid="C1.Report.FlexReport.OnOpen*">OnOpen Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Report_FlexReport_OnOpen_" data-uid="C1.Report.FlexReport.OnOpen*"></a>
<h4 id="C1_Report_FlexReport_OnOpen" data-uid="C1.Report.FlexReport.OnOpen">OnOpen</h4>
<div class="markdown level1 summary"><p>Gets or sets the <b>VBScript</b> that is executed when the report starts rendering.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[C1Category(&quot;Script&quot;)]
[C1Description(&quot;C1FlexReport.OnOpen&quot;, &quot;Script executed when the report starts rendering.&quot;)]
[Browsable(false)]
public string OnOpen { get; set; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;C1Category(&quot;Script&quot;)&gt;
&lt;C1Description(&quot;C1FlexReport.OnOpen&quot;, &quot;Script executed when the report starts rendering.&quot;)&gt;
&lt;Browsable(False)&gt;
Public Property OnOpen As String</code></pre>
</div>
<h5 id="C1_Report_FlexReport_OnOpen_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The control also fires the <a class="xref" href="C1.Report.FlexReport.StartReport.html">StartReport</a> event at this time.</p>
<p>The difference between the regular event and the VBScript property is that the handler for the regular event 
belongs to the application, and should thus be used to support tasks that are independent of the report.
For example, to display a message on the main window when rendering starts.</p>
<p>The VBScript handler in the property belongs to the report, and will be executed regardless of the application.
For example, a report might contain a VBScript handler that resets global variables in the VBScript context 
when a report starts rendering.</p>
</div>
</div>
