ActiveReports 8
AddScriptReference Method
See Also  Example
GrapeCity.ActiveReports.v8 Assembly > GrapeCity.ActiveReports Namespace > SectionReport Class : AddScriptReference Method

scriptRef
Name of the assembly to be added to the scripting run-time context.

Glossary Item Box

Adds a reference to the specified assembly to be loaded into the scripting run-time context.

Syntax

Visual Basic (Declaration) 
Public Sub AddScriptReference( _
   ByVal scriptRef As System.String _
) 
C# 
public void AddScriptReference( 
   System.string scriptRef
)

Parameters

scriptRef
Name of the assembly to be added to the scripting run-time context.

Remarks

ActiveReports loads assemblies that are referenced in the application. You can use this method to add additional assemblies to be used in scripting that are not part of the application running the report.

Example

C#Copy Code
private void runReport() 
{ 
      SectionReport1 rpt = new SectionReport1(); 
      rpt.AddScriptReference("System.Data"); 
      rpt.Run(); 
      this.viewer1.Document = rpt.Document; 
}
Visual BasicCopy Code
Private Sub runReport() 
      Dim rpt As New SectionReport1() 
      rpt.AddScriptReference("System.Data") 
      rpt.Run() 
      Me.viewer1.Document = rpt.Document 
End Sub

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also