以文本方式查看主题 - 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=148174) |
-- 作者:yuntian -- 发布时间:2020/4/1 14:51:00 -- 网页生成表格中表达式字段无法显示 求教,网页生成表格中表达式字段无法显示 ![]() ![]() |
-- 作者:有点蓝 -- 发布时间:2020/4/1 15:33:00 -- 贴出代码,截图,或者上传实例说明 |
-- 作者:yuntian -- 发布时间:2020/4/1 17:28:00 -- If e.Path.StartsWith("Reports\\") e.Resp Select Case e.Path Case "Reports\\jianli.htm" Dim Book As New XLS.Book(ProjectPath & "Attachments\\账单.xls") book.AddDataTable("ghs","foxcaigou","S elect * f rom {ghs} w here yhm = \'" & e.GetValues("nm") & "\'") book.AddDataTable("etcfk","foxcaigou","s elect * f rom {etcfk} w here 合同类型 <> \'拆分合同\'") book.AddRelation("ghs","ghs","etcfk","gys") \'建立关联 e.WriteBookAsHTML(Book) Case Else e.AsReportServer("Reports\\") End Select End If 如果去掉下面这一段 已入发票、未收发票、已付金额、未付金额这4列会正常显示,但是会报未关联错误,并且软件卡死 book.AddDataTable("etcfk","foxcaigou","s elect * f rom {etcfk} w here 合同类型 <> \'拆分合同\'") |
-- 作者:yuntian -- 发布时间:2020/4/1 17:29:00 -- ![]() ![]() |
-- 作者:有点蓝 -- 发布时间:2020/4/1 17:59:00 -- 关联列列类型不一致,或者列名错误,或者数据库没有这个列 |
-- 作者:yuntian -- 发布时间:2020/4/1 18:27:00 -- 数据库里面没有这4列,这4列是表达式列 |
-- 作者:有点蓝 -- 发布时间:2020/4/2 9:04:00 -- 这种后台方式生成报表无法直接使用表达式列,在execl模板里使用表达式计算http://www.foxtable.com/webhelp/topics/1388.htm |