以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  报表打印代码  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=21162)

--  作者:caoxy
--  发布时间:2012/7/3 17:17:00
--  报表打印代码

师傅你好:

在帮助文件中有下列打印按钮代码,不知("net20sp1") 代码代表什么,在实际使用中如何设置,谢谢!

If Functions.Execute("net20sp1") = False Then
    Return
End If
Dim Book As New XLS.Book(ProjectPath & "Attachments\\资料卡.xls")
Dim fl As String = ProjectPath & "Reports\\资料卡.xls"
Book.Build()
Book.Save(fl)
Dim App As New MSExcel.Application
Dim Wb As MSExcel.WorkBook = App.WorkBooks.Open(fl)
Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets(1)
Ws.PrintOut
App.Quit


--  作者:狐狸爸爸
--  发布时间:2012/7/3 17:57:00
--  

这是示例文件的一个自定义函数:
http://www.foxtable.com/help/topics/1486.htm


 
这个函数用于判断用户逇.net版本,实际使用的时候,你没有必要做这种判断,直接删除下面的代码:
If Functions.Execute("net20sp1") = False Then
         Return
End If