Foxtable(狐表)用户栏目专家坐堂 → [求助]关于报表的问题


  共有2341人关注过本帖树形打印复制链接

主题:[求助]关于报表的问题

帅哥哟,离线,有人找我吗?
有点甜
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/8/10 17:03:00 [显示全部帖子]

1、

 
Dim lst As WinForm.ListBox = e.Form.Controls("ListBox1")
If lst.SelectedValue IsNot Nothing Then
    Dim tbx As WinForm.TextBox = e.Form.Controls("TextBox1")
    Dim Book As New XLS.Book(ProjectPath & "Attachments\" & lst.SelectedValue  )
    If  tbx.value IsNot Nothing Then
        Dim dlg As new SaveFileDialog
        dlg.Filter = "excel|*.xls"
        dlg.InitialDirectory = ProjectPath & "报表\"
        dlg.FileName = tbx.value & ".xls"
        If dlg.ShowDialog = DialogResult.OK Then
            Dim fl As String = dlg.FileName
            Dim Sheet As XLS.Sheet = Book.Sheets(0)
            Book.Build() '生成报表
            Book.Save(fl)
            Proc.File = fl
            Proc.Start()
        End If
    Else MessageBox.Show("请填写报表名称!","温馨提示:")
    End If
Else   MessageBox.Show("请选择报表模板!","温馨提示:")
End If

[此贴子已经被作者于2018/8/10 17:03:07编辑过]

 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/8/10 17:04:00 [显示全部帖子]

2、直接统计,不能统计关联表。具体问题做个实例说明。

 回到顶部