vba - 是否可以使用 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
解决方案
推荐阅读
- python - 在 Python 中快速读取 MPEG 传输流(二进制文件)PID 值
- emacs - 如何在 Spacemacs 启动时打开“填充列”指示器?
- shell - 如何激活使用 shell 侦听的多个端口
- react-native - 有条件的 Drawer.Navigator 的 openByDefault 属性无法正常工作(“@react-navigation/drawer”:“^5.12.5”)
- javascript - 将可观察数组的数组合并到一个数组中
- flutter - 如何在 Flutter 中创建“虚线步长指示器”?
- javascript - 使用函数推送对象数组
- python - 如果一个 ID 有多个日期,则只应显示最小和最大日期,如图所示
- node.js - next.js 中的正则表达式
- linux - 将rust交叉编译到android时如何修复“ld:错误:无法找到库-lgcc”?