Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共6 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:Excel报表

1楼
1234567 发表于:2024/8/22 12:17:00

图片点击可在新窗口打开查看此主题相关图片如下:1.png
图片点击可在新窗口打开查看

图片点击可在新窗口打开查看此主题相关图片如下:2.png
图片点击可在新窗口打开查看
2楼
有点蓝 发表于:2024/8/22 13:32:00
麻烦把代码文字发上来了
3楼
1234567 发表于:2024/8/22 13:41:00

For Each dt As DataTable In DataTables
    dt.Save()
Next
Dim jb As New SQLJoinTableBuilder("零件加工工艺单", "任务单")
jb.C
jb.AddTable("任务单", "任务单编号", "项目阶段", "任务单编号", JoinModeEnum.left)
jb.AddTable("项目阶段", "项目段号", "零件加工", "项目段号", JoinModeEnum.left)
jb.AddTable("零件加工", "工艺单编号", "工艺内容", "工艺单编号", JoinModeEnum.left)
jb.AddTable("工艺内容", "工序号", "工步", "工序号", JoinModeEnum.left)
jb.AddCols( "{任务单}.任务单编号", "{任务单}.工装模具编号", "{任务单}.产品名称", "{任务单}.产品图号", "{任务单}.模具工", "{零件加工}.工艺单编号", "{零件加工}.零件名称", "{零件加工}.零件图号", "{零件加工}.零件数量", "{工艺内容}.工序号", "{工艺内容}.工序", "{工艺内容}.计划作业人员", "{工艺内容}.机床代号", "{工艺内容}.机床编号", "{工艺内容}.计划开始日期", "{工艺内容}.计划完成日期", "{工艺内容}.工期", "{工艺内容}.加工人", "工步号", "工步", "工步时间小计", "加工内容")
If Tables("生产管理_Table03").Current IsNot Nothing Then
    jb.Filter = "{零件加工}.[工艺单编号] = '" & Tables("生产管理_Table03").Current("工艺单编号") & "'"
End If

For Each dr1 As Datadow In jb
    dr1("工序号") = Right (dr1("工序号"), 2)
Next
jb.Build()
Dim Book As New XLS.Book(ProjectPath & "Attachments\零件加工工艺单.xls")

Dim Sheet As XLS.Sheet = Book.Sheets(0)
Book.Build() '生成报表
Book.Save(fl)
Dim Proc As New Process
Proc.File = fl
Proc.Start()

4楼
有点蓝 发表于:2024/8/22 13:43:00
……

If Tables("生产管理_Table03").Current IsNot Nothing Then
    jb.Filter = "{零件加工}.[工艺单编号] = '" & Tables("生产管理_Table03").Current("工艺单编号") & "'"
End If

jb.Build()

For Each dr1 As Datadow In datatables("零件加工工艺单")
    dr1("工序号") = Right (dr1("工序号"), 2)
Next

……

5楼
1234567 发表于:2024/8/22 13:55:00

图片点击可在新窗口打开查看此主题相关图片如下:3.png
图片点击可在新窗口打开查看
6楼
有点蓝 发表于:2024/8/22 14:01:00
For Each dr1 As Datadow In datatables("零件加工工艺单").Datadows
共6 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .02344 s, 2 queries.