In the End User Designer control, you may want to disable script code during preview, but ActiveReports does not have built-in functionality that allows you to do so.
A workaround is the use of a temporary instance of the Report component, as shown in the following sample code:
Dim temp_report As New ActiveReport temp_report = ARDesigner.Report temp_report.Script = “” temp_report.Run ARViewer21.ReportSource = temp_report