Visual Basic (Declaration) | |
---|---|
Public Sub AddCode( _ ByVal script As System.String _ ) |
C# | |
---|---|
public void AddCode( System.string script ) |
Parameters
- script
- Script code written in the specified report scripting language.
This method is typically used when executing stand-alone reports that are not compiled into the application. Injected code allows the report to access features such as custom calculation functions and data access modules in the calling application.
C# | Copy Code |
---|---|
public string addThisCode() { string sCode = "public string ShowACMessage()\"{return \"my Added Code\";}"; return sCode; } private void rptAddCode_ReportStart(object sender, System.EventArgs eArgs) { this.AddCode(addThisCode()); } |
Visual Basic | Copy Code |
---|---|
Public Function addThisCode() As String Dim sCode As String = "public string ShowACMessage()""{return ""my Added Code"";}" Return sCode End Function Private Sub rptAddCode_ReportStart(sender As Object, eArgs As System.EventArgs) Me.AddCode(addThisCode()) End Sub |
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