以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 生成的word报表如何才能升序排列 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=153746) |
-- 作者:yfy13338431925 -- 发布时间:2020/8/21 11:12:00 -- 生成的word报表如何才能升序排列 蓝老师:设计的word打印代码如下,但是打印出的结果,排序不是默认的升序,您帮我看看 Dim tm As String = ProjectPath & "Attachments\\专向审核任免审批表.doc" \'指定模板文件 Dim fl As String = ProjectPath & "Reports\\档案专项审核干部任免审批表.doc" \'指定目标文件 Dim wrt As New WordReport(Tables("人事档案基础信息"),tm,fl) \'定义一个WordReport Dim pdr2 As DataRow = Nothing Dim str2 As String = "" For Each dr2 As DataRow In DataTables("年度考核情况").Select("档案编号 = \'" & Tables("人事档案基础信息").current("档案编号") & "\'", "考核等级") If pdr2 IsNot Nothing Then str2 &= pdr2("考核年度") &" 考核评为"& pdr2("考核等级")& chr(13) \'& pdr2("类别")& "一次, 主要表现"& pdr2("内容描述") & chr(13) End If pdr2 = dr2 Next If pdr2 IsNot Nothing Then str2 &= pdr2("考核年度") &" 考核评为"&pdr2("考核等级") \'& pdr2("类别")&"一次, 主要表现"& pdr("内容描述") End If wrt.Replace("[考核年度][考核等级]",str2) \'用代码计算出总的销售数量并替换模板中的合计标记 wrt.Build() \'生成报表 wrt.Show() \'显示报表 wrt.Show() \'显示报表 word模板设计师这样的 输出的结果排序是乱的
|
-- 作者:有点蓝 -- 发布时间:2020/8/21 11:22:00 -- For Each dr2 As DataRow In DataTables("年度考核情况").Select("档案编号 = \'" & Tables("人事档案基础信息").current("档案编号") & "\'", "考核年度,考核等级") |