Use the AddScriptReference method to gain access to .NET (or other) namespaces.
Use AddScriptReference() in the project's code to add references to the script that might be needed. AddScriptReference() would only need to be used if there is a reference needed inside the script that does not get initialized in the project before the script runs, such as the System.Data.dll.
//C# private void runReport() { ActiveReport1 rpt = new ActiveReport1(); rpt.AddScriptReference("System.Data.dll"); rpt.Run(); this.viewer1.Document = rpt.Document; }
'Visual Basic Private Sub runReport() Dim rpt as new ActiveReport1() rpt.AddScriptReference("System.Data.dll") rpt.Run() Me.Viewer1.Document = rpt.Document End Sub
Concepts
Scripting