以文本方式查看主题

-  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=56010)

--  作者:gcc123
--  发布时间:2014/8/27 17:37:00
--  列打印
如何打印单个选中列
--  作者:Bin
--  发布时间:2014/8/27 17:41:00
--  
隐藏其他列
dim cn as tables("表名").cols(tables("表名").ColSel).name
for each c as col in tables("表名").cols
    if c.name <> cn then
          c.Visible=false
    end if
next

Tables("表名").Print(true,false)

for each c as col in tables("表名").cols
          c.Visible=True
next


--  作者:gcc123
--  发布时间:2014/8/29 13:39:00
--  

图片点击可在新窗口打开查看此主题相关图片如下:qq截图20140829133919.png
图片点击可在新窗口打开查看

--  作者:有点甜
--  发布时间:2014/8/29 14:05:00
--  

Dim cn As Integer = Tables("表名").ColSel
For Each c As Col In Tables("表名").cols
    If c.index <> cn
        c.Visible=False
    End If
Next


Tables("表名").Print(True,False)


For Each c As Col In Tables("表名").cols
    c.Visible=True
Next


--  作者:gcc123
--  发布时间:2014/8/29 14:21:00
--  


图片点击可在新窗口打开查看此主题相关图片如下:qq截图20140829142031.png
图片点击可在新窗口打开查看

同时选中三列 执行起来就打印一列


--  作者:有点甜
--  发布时间:2014/8/29 14:41:00
--  

Dim l As Integer = Tables("表名").LeftCol
Dim r As Integer = Tables("表名").RightCol

For Each c As Col In Tables("表名").cols
    If c.index < l OrElse c.Index > r Then
        c.Visible=False
    End If
Next


Tables("表名").Print(True,False)


For Each c As Col In Tables("表名").cols
    c.Visible=True
Next


--  作者:gcc123
--  发布时间:2014/8/29 14:53:00
--  
谢谢