-- 作者:sf020cf
-- 发布时间:2016/1/13 17:54:00
-- 类似单元格超链接
现有维修费用统计与维修明细
问题一
在维修费用统计表事件中有代码
Select Case e.DataCol.name Case "郭贤","黄陆武","余老板","牛朝阳","宋会毫","罗车厢","黄康福","汤伟华","钟兴平","李观保","李士林","公司购买机油","其他已报费用" Dim dt As DataTable = DataTables("维修明细") e.DataRow("郭贤")=dt.sqlCompute("sum(电路金额)","[维修日期] = \'" & e.DataRow("日期") & "\'and [车牌] = \'" & e.DataRow("车牌") & "\'") e.DataRow("黄陆武")=dt.sqlCompute("sum(陆武费用)","[维修日期] = \'" & e.DataRow("日期") & "\'and [车牌] = \'" & e.DataRow("车牌") & "\'") e.DataRow("余老板")=dt.sqlCompute("sum(余老板费用)","[维修日期] = \'" & e.DataRow("日期") & "\'and [车牌] = \'" & e.DataRow("车牌") & "\'") e.DataRow("牛朝阳")=dt.sqlCompute("sum(牛朝阳费用)","[维修日期] = \'" & e.DataRow("日期") & "\'and [车牌] = \'" & e.DataRow("车牌") & "\'") e.DataRow("宋会毫")=dt.sqlCompute("sum(宋会毫费用)","[维修日期] = \'" & e.DataRow("日期") & "\'and [车牌] = \'" & e.DataRow("车牌") & "\'") e.DataRow("罗车厢")=dt.sqlCompute("sum(罗车厢费用)","[维修日期] = \'" & e.DataRow("日期") & "\'and [车牌] = \'" & e.DataRow("车牌") & "\'") e.DataRow("黄康福")=dt.sqlCompute("sum(黄康福费用)","[维修日期] = \'" & e.DataRow("日期") & "\'and [车牌] = \'" & e.DataRow("车牌") & "\'") e.DataRow("汤伟华")=dt.sqlCompute("sum(汤伟华费用)","[维修日期] = \'" & e.DataRow("日期") & "\'and [车牌] = \'" & e.DataRow("车牌") & "\'") e.DataRow("钟兴平")=dt.sqlCompute("sum(钟兴平费用)","[维修日期] = \'" & e.DataRow("日期") & "\'and [车牌] = \'" & e.DataRow("车牌") & "\'") e.DataRow("李观保")=dt.sqlCompute("sum(李观保费用)","[维修日期] = \'" & e.DataRow("日期") & "\'and [车牌] = \'" & e.DataRow("车牌") & "\'") e.DataRow("李士林")=dt.sqlCompute("sum(李士林费用)","[维修日期] = \'" & e.DataRow("日期") & "\'and [车牌] = \'" & e.DataRow("车牌") & "\'") e.DataRow("公司购买机油")=dt.sqlCompute("sum(金额)","[维修日期] = \'" & e.DataRow("日期") & "\'and [车牌] = \'" & e.DataRow("车牌") & "\'") e.DataRow("其他已报费用")=dt.sqlCompute("sum(其他费用)","[维修日期] = \'" & e.DataRow("日期") & "\'and [车牌] = \'" & e.DataRow("车牌") & "\'") End Select
重置某一列,取得值费时五分钟左右,想请教该怎样改善
问题二.
我想在点击车牌 得到该车牌同一个时间段的所有维修明细, (类似于excel的超链接),因为该车牌在不同时间段有重复出现,所以没有把两张表用车牌关联 这个有无其他方式可以实现.
|