Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
我也想这样搞,估计不行.因为你用的模板不同,这样一来,要根据你的列表项目取模板了,我看不太可能.
这样试试。
Dim T1,T2 As String
Dim Da As DataTable = DataTables("某表名")
for Each T1 in Da.GetComboListString("快递公司").split("|")
T2 = ProjectPath & "Attachments\" & T1 & ".xls"
Dim Book As New XLS.Book(T2)
Book.Build()
Book.Save(T2)
Dim Proc As New Process
Proc.File = "reports \ " & T1 & ".xls"
Proc.Verb= "Print"
Proc.Start()
Next
请自行把 "reports \ " 中的空格去掉(论坛的Bug,显示不正常)
这样试试。
Dim T1,T2 As String
Dim Da As DataTable = DataTables("某表名")
for Each T1 in Da.GetComboListString("快递公司").split("|")
T2 = ProjectPath & "Attachments\" & T1 & ".xls"
Dim Book As New XLS.Book(T2)
Book.Build()
Book.Save(T2)
Dim Proc As New Process
Proc.File = "reports \ " & T1 & ".xls"
Proc.Verb= "Print"
Proc.Start()
Next
请自行把 "reports \ " 中的空格去掉(论坛的Bug,显示不正常)
don老大,我认为这个有一些问题,他是一张表,有N多个报表.从组合框里选择报表名,然后按打印按钮就可以打出所需要的报表.这个按钮的公式里的报表名字就是要随着组合框里报表名生成.不然,要做很多个按钮解决.
也许我会错意:上面的是列印快递公司列所有报表.
这样?
Dim T As String
T = e.Form.Controls("ComboBox1").Value
T = ProjectPath & "Attachments\" & T & "模板.xls"
Dim Book As New XLS.Book(T)
Book.Build()
Book.Save(ProjectPath & "Reports\ " & T & ".xls")
Dim Proc As New Process
Proc.File = "reports\ " & T & ".xls"
Proc.Verb= "Print"
Proc.Start()
也许我会错意:上面的是列印快递公司列所有报表.
这样?
Dim T As String
T = e.Form.Controls("ComboBox1").Value
T = ProjectPath & "Attachments\" & T & "模板.xls"
Dim Book As New XLS.Book(T)
Book.Build()
Book.Save(ProjectPath & "Reports\ " & T & ".xls")
Dim Proc As New Process
Proc.File = "reports\ " & T & ".xls"
Proc.Verb= "Print"
Proc.Start()
不行,狐爸设计的代码本身就是指定模板,并且打开这个指定模板的.老大我想这样你看看怎么做.如果我有申通和顺丰两个模板,用复选框或者单选框选择然后打印.我发个表给你,你看一下.
下载信息 [文件大小: 下载次数: ] | |
点击浏览该文件:顺丰标签.table |