以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 关于table中选择行打印问题 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=93460) |
-- 作者:benwong2013 -- 发布时间:2016/11/29 14:51:00 -- 关于table中选择行打印问题 有一个资产标签,如下如图: 希望在下表的选择任意多行之后能套打资产标签,请问以下代码哪里出了问题: Dim lst As new List(of String) For Each r As Row In Tables("资产管理_Table1").GetCheckedRows lst.Add(r("_Identify")) Next Dim filter = Tables("资产管理_Table1").Filter Tables("资产管理_Table1").Filter = "[_Identify] in (" & String.Join(",",lst.ToArray) & ")" Dim Book As New XLS.Book(ProjectPath & "Attachments\\Laberzc.xls") Dim fl As String = ProjectPath & "Reports\\laberzc.xls" Book.Build() \'生成细节区 Book.Save(fl) \'保存工作簿 Dim Proc As New Process \'打开工作簿 Proc.File = fl Proc.Start() Tables("资产管理_Table1").Filter = filter |
-- 作者:有点蓝 -- 发布时间:2016/11/29 15:06:00 -- 如果是副本,参考:http://www.foxtable.com/webhelp/scr/2627.htm 注意表名称
|
-- 作者:benwong2013 -- 发布时间:2016/11/29 15:28:00 -- 还是不行,都是只打印最后一个选择的行,其它的行都没有 Dim lst As new List(of String) For Each r As Row In Tables("资产管理_Table1").GetCheckedRows lst.Add(r("_Identify")) Next Dim filter = Tables("资产管理_Table1").Filter Tables("资产管理_Table1").Filter = "[_Identify] in (" & String.Join(",",lst.ToArray) & ")" Dim Book As New XLS.Book(ProjectPath & "Attachments\\Laberzc.xls") Dim fl As String = ProjectPath & "Reports\\laberzc.xls" Dim Sheet As XLS.Sheet = Book.Sheets(0) Sheet(1,0).Value = "<资产管理_Table1, 10>" \'细节区定义一 Sheet(6,0).Value = "<资产管理_Table1>" \'细节区定义二 Book.Build() \'生成报表 Book.Save(fl) Dim Proc As New Process Proc.File = fl Proc.Start() Tables("资产管理_Table1").Filter = filter |
-- 作者:有点蓝 -- 发布时间:2016/11/29 15:51:00 -- 在<End>下面加一个<ALL>标签:http://www.foxtable.com/webhelp/scr/0201.htm |