首页 > 解决方案 > 是否可以使用 VBA 代码作为 SSRS 中文本框的操作

问题描述

我的 SSRS 报告中有 VB 代码,它正在调用灵巧度来打开一个窗口。是否可以在文本框字段的操作中引用代码?我希望用户能够单击该字段并打开窗口。

Dim GPApp As Object
Public Sub Main()
    'Create the GP application object
    GPApp = CreateObject("Dynamics.Application")
    On Error GoTo 0
    If GPApp Is Nothing Then
        MsgBox("Failed to create the application object")
    End If
End Sub


Public Sub Receipt_Click()
    Dim ErrVal As Integer
    Dim error_msg As String
    Dim GpApp As Object

    ErrVal = GpApp.ExecuteSanScript("open form POP_Inquiry_Receivings_Entry; set 'POP Receipt Number' of window POP_Inquiry_Receivings_Entry of form POP_Inquiry_Receivings_Entry to RCT19002;", error_msg)
    If ErrVal <> 0 Then
        'A compiler error occurred. Display the error.
        MsgBox(error_msg)
    End If
End Sub

标签: vbareporting-servicesactiondexterity

解决方案


推荐阅读