-- 作者:gcc123
-- 发布时间:2014/11/7 21:13:00
-- 字体
Dim fnt As New Font(CurrentTable.Font.Name, 12, CurrentTable.Font.Style) CurrentTable.Font = fnt
If CurrentTable.Cols.Contains("回单") Then CurrentTable.DataTable.Save CurrentTable.DataTable.ReplaceFor("回单", "回单", iif(CurrentTable.Filter>"",CurrentTable.Filter,"1=1") & " and 回单 is not null") End If With DataTables("应收查询") .DataCols("吨位2").Caption = "吨位" .DataCols("扣款2").Caption = "扣款" .DataCols("价格2").Caption = "价格" .BuildHeader() End With Dim l As Integer =CurrentTable.LeftCol Dim r As Integer = CurrentTable.RightCol
For Each c As Col In CurrentTable.cols If c.index < l OrElse c.Index > r Then c.Visible=False End If Next CurrentTable.Print(True,False) For Each c As Col In CurrentTable.cols c.Visible=True Next If CurrentTable.Cols.Contains("回单") Then CurrentTable.DataTable.RejectChanges End If 打印按钮代码
希望完成 1:生成打印预览后单元格大小随着字体大小的改变自动改变
2:关闭打印预览后 字体大小回到原系统默认状态
|