Dim lieming As WinForm.CheckedListBox = e.Form.Controls("lieCheckedListBox")
If sjdcxzb="POS机库存资料" Then
Dim t As Table = e.form.controls("Table1").Table
Dim str As String = t.getColVisibleWidth
If lieming.value > "" Then
For Each c As Col In t.Cols
c.visible = False
Next
For Each s As String In lieming.value.split(",")
t.cols(s).visible = True
Next
End If
e.Form.visible = False '隐藏
t.Print(True, False)
t.SetColVisibleWidth(str)
e.Form.visible = True '显示
ElseIf sjdcxzb="POS机查询数据表" Then
Dim t As Table = e.form.controls("Table1").Table
Dim str As String = t.getColVisibleWidth
If lieming.value > "" Then
For Each c As Col In t.Cols
c.visible = False
Next
For Each s As String In lieming.value.split(",")
t.cols(s).visible = True
Next
End If
e.Form.visible = False '隐藏
t.Print(True, False)
t.SetColVisibleWidth(str)
e.Form.visible = True '显示
ElseIf sjdcxzb="POS机绑定商户历史记录表" Then
Dim t As Table = e.form.controls("Table1").Table
Dim str As String = t.getColVisibleWidth
If lieming.value > "" Then
For Each c As Col In t.Cols
c.visible = False
Next
For Each s As String In lieming.value.split(",")
t.cols(s).visible = True
Next
End If
e.Form.visible = False '隐藏
t.Print(True, False)
t.SetColVisibleWidth(str)
e.Form.visible = True '显示
ElseIf sjdcxzb="流量卡绑定商户历史记录表" Then
Dim t As Table = e.form.controls("Table1").Table
Dim str As String = t.getColVisibleWidth
If lieming.value > "" Then
For Each c As Col In t.Cols
c.visible = False
Next
For Each s As String In lieming.value.split(",")
t.cols(s).visible = True
Next
End If
e.Form.visible = False '隐藏
t.Print(True, False)
t.SetColVisibleWidth(str)
e.Form.visible = True '显示
ElseIf sjdcxzb="代理商资料表" Then
Dim t As Table = e.form.controls("Table1").Table
Dim str As String = t.getColVisibleWidth
If lieming.value > "" Then
For Each c As Col In t.Cols
c.visible = False
Next
For Each s As String In lieming.value.split(",")
t.cols(s).visible = True
Next
End If
e.Form.visible = False '隐藏
t.Print(True, False)
t.SetColVisibleWidth(str)
e.Form.visible = True '显示
ElseIf sjdcxzb="POS机信息表" Then
Dim t As Table = e.form.controls("Table1").Table
Dim str As String = t.getColVisibleWidth
If lieming.value > "" Then
For Each c As Col In t.Cols
c.visible = False
Next
For Each s As String In lieming.value.split(",")
t.cols(s).visible = True
Next
End If
e.Form.visible = False '隐藏
t.Print(True, False)
t.SetColVisibleWidth(str)
e.Form.visible = True '显示
ElseIf sjdcxzb="供应商资料" Then
Dim t As Table = e.form.controls("Table1").Table
Dim str As String = t.getColVisibleWidth
If lieming.value > "" Then
For Each c As Col In t.Cols
c.visible = False
Next
For Each s As String In lieming.value.split(",")
t.cols(s).visible = True
Next
End If
e.Form.visible = False '隐藏
t.Print(True, False)
t.SetColVisibleWidth(str)
e.Form.visible = True '显示
ElseIf sjdcxzb="仓库资料" Then
Dim t As Table = e.form.controls("Table1").Table
Dim str As String = t.getColVisibleWidth
If lieming.value > "" Then
For Each c As Col In t.Cols
c.visible = False
Next
For Each s As String In lieming.value.split(",")
t.cols(s).visible = True
Next
End If
e.Form.visible = False '隐藏
t.Print(True, False)
t.SetColVisibleWidth(str)
e.Form.visible = True '显示
ElseIf sjdcxzb="物品表" Then
Dim t As Table = e.form.controls("Table1").Table
Dim str As String = t.getColVisibleWidth
If lieming.value > "" Then
For Each c As Col In t.Cols
c.visible = False
Next
For Each s As String In lieming.value.split(",")
t.cols(s).visible = True
Next
End If
e.Form.visible = False '隐藏
t.Print(True, False)
t.SetColVisibleWidth(str)
e.Form.visible = True '显示
ElseIf sjdcxzb="客户资料" Then
Dim t As Table = e.form.controls("Table1").Table
Dim str As String = t.getColVisibleWidth
If lieming.value > "" Then
For Each c As Col In t.Cols
c.visible = False
Next
For Each s As String In lieming.value.split(",")
t.cols(s).visible = True
Next
End If
e.Form.visible = False '隐藏
t.Print(True, False)
t.SetColVisibleWidth(str)
e.Form.visible = True '显示
ElseIf sjdcxzb="流量卡资料" Then
Dim t As Table = e.form.controls("Table1").Table
Dim str As String = t.getColVisibleWidth
If lieming.value > "" Then
For Each c As Col In t.Cols
c.visible = False
Next
For Each s As String In lieming.value.split(",")
t.cols(s).visible = True
Next
End If
e.Form.visible = False '隐藏
t.Print(True, False)
t.SetColVisibleWidth(str)
e.Form.visible = True '显示
ElseIf sjdcxzb="流量卡充值提醒表" Then
Dim t As Table = e.form.controls("Table1").Table
Dim str As String = t.getColVisibleWidth
If lieming.value > "" Then
For Each c As Col In t.Cols
c.visible = False
Next
For Each s As String In lieming.value.split(",")
t.cols(s).visible = True
Next
End If
e.Form.visible = False '隐藏
t.Print(True, False)
t.SetColVisibleWidth(str)
e.Form.visible = True '显示
ElseIf sjdcxzb="客户资料提醒表" Then
Dim t As Table = e.form.controls("Table1").Table
Dim str As String = t.getColVisibleWidth
If lieming.value > "" Then
For Each c As Col In t.Cols
c.visible = False
Next
For Each s As String In lieming.value.split(",")
t.cols(s).visible = True
Next
End If
e.Form.visible = False '隐藏
t.Print(True, False)
t.SetColVisibleWidth(str)
e.Form.visible = True '显示
ElseIf sjdcxzb="杂项库存资料" Then
Dim t As Table = e.form.controls("Table1").Table
Dim str As String = t.getColVisibleWidth
If lieming.value > "" Then
For Each c As Col In t.Cols
c.visible = False
Next
For Each s As String In lieming.value.split(",")
t.cols(s).visible = True
Next
End If
e.Form.visible = False '隐藏
t.Print(True, False)
t.SetColVisibleWidth(str)
e.Form.visible = True '显示
ElseIf sjdcxzb="杂项统计" Then
Dim t As Table = e.form.controls("Table1").Table
Dim str As String = t.getColVisibleWidth
If lieming.value > "" Then
For Each c As Col In t.Cols
c.visible = False
Next
For Each s As String In lieming.value.split(",")
t.cols(s).visible = True
Next
End If
e.Form.visible = False '隐藏
t.Print(True, False)
t.SetColVisibleWidth(str)
e.Form.visible = True '显示
End If
甜老师您看看哪错了怎么单击打印按钮打印调整窗体不隐藏呀?
已解决
还有一个问题就是如果"流量卡历史绑定记录查询窗体"中的表如果作为副本代码可如下写
e.form.controls("Table1").Table.Filter = Tables("流量卡历史绑定记录查询窗体_Table2").Filter
如果不是作为副本代码怎么写呢?
[此贴子已经被作者于2017/12/7 9:32:33编辑过]