有一个按钮,代码如下(本机WIN10系统):Dim code As String = Tables("出库单").Current("单据编号")
Dim pm As String = Tables("出库单").Current("发料项目")
Dim Bar As New BarCodeBuilder
Bar.Symbology = Barpro.Symbology.Code128
Bar.Code = code
Bar.BarRatio = 0.4
Bar.BarHeight = 15
bar.SaveImage(ProjectPath & "Images\BarCode.wmf",600)
'生成Excel报表:
Dim Book As New XLS.Book(ProjectPath & "Attachments\出库单模版.xls")
Dim fl As String = ProjectPath & "Reports\" & pm.Split("]")(0).split("[")(1) & "_" & code & "_出库签收单"
Book.Build() '生成细节区
Book.Save(fl & ".xls")
Book.SaveToPDF(fl & ".pdf")
Dim Proc As New Process '打开PDF文件
Proc.File = fl & ".xls"
If e.Form.Controls("CheckBox1").checked Then
Proc.Verb = "Printto" '指定动作
Proc.Start()
Tables("出库单").Current("打印情况") = "已打印"
Else
Proc.Start()
End If
此主题相关图片如下:代码.jpg
在开发模式下一切正常,发布后,本机点了代码所在的按钮没有反应。把文件拷给其它人试用,WIN7的错误代码如下:
此主题相关图片如下:值不在预期范围内.png
WIN10系统(非本机)的错误如下:
此主题相关图片如下:win10出错.png
请教问题如何排除?