Foxtable(狐表)用户栏目专家坐堂 → 专业报表代码请老师指导下


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

主题:专业报表代码请老师指导下

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


加好友 发短信
等级:四尾狐 帖子:824 积分:6288 威望:0 精华:0 注册:2012/3/1 3:17:00
  发帖心情 Post By:2013/6/3 10:21:00 [只看该作者]

Bin老师在么图片点击可在新窗口打开查看,望指导

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


加好友 发短信
等级:贵宾 帖子:35433 积分:178524 威望:0 精华:3 注册:2013/3/30 16:36:00
  发帖心情 Post By:2013/6/3 10:28:00 [只看该作者]

你参考帮助做一下吧, http://www.foxtable.com/help/topics/2408.htm

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


加好友 发短信
等级:四尾狐 帖子:824 积分:6288 威望:0 精华:0 注册:2012/3/1 3:17:00
  发帖心情 Post By:2013/6/3 16:02:00 [只看该作者]

For c As Integer = 0 To tb.Cols.Count - 1
       
rt.Cells(0,c).Text = tb.Cols(c).Name
    Next
    For
r As Integer = p * prs To math.min(tb.Rows.Count - 1,( p + 1) * prs - 1)
       
sum1 =sum1 + tb.rows(r)("数量")
       
sum2 =sum2 + tb.rows(r)("金额")
        For
c As Integer = 0 To tb.Cols.Count - 1
           
rt.Cells(r - p * prs + 1, c).Text = tb.rows(r)(c)
        Next
    Next
帮助中标题跟内容的是以循环形式,不知道如何下手,还望指教

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


加好友 发短信
等级:四尾狐 帖子:824 积分:6288 威望:0 精华:0 注册:2012/3/1 3:17:00
  发帖心情 Post By:2013/6/4 0:25:00 [只看该作者]

经过几个小时的奋斗终于学习到Bin老师所指点的,感谢Bin老师,最后当中代码改为:

For t As Integer = p * prs To math.min(tb.Rows.Count - 1,( p + 1) * prs - 1)
        sum1 =sum1 + tb.rows(t)("借方发生额")
        sum2 =sum2 + tb.rows(t)("贷方发生额")     
        If tb.rows(t)("日期") <> #01/01/0001# Then
            rt.Cells(t - p * prs + 2,0).Text = Format(tb.rows(t)("日期"),"yyyy年MM月dd日")
            rt.Cells(t - p * prs + 2,1).Text = tb.rows(t)("摘要")
            Dim money As Integer = tb.rows(t)("借方发生额")
            If money > 0 Then
                For i As Double = 9 To 2 Step - 1
                    rt.Cells(t - p * prs + 2, i).Text = GetDigit(Money,9-i)
                    If rt.Cells(t - p * prs + 2,i).Text =  "¥" Then
                        Exit For
                    End If
                Next
                money = (tb.rows(t)("借方发生额") - money) * 100
                If money > 0 Then
                    rt.Cells(t - p * prs + 2, 11).Text = GetDigit(Money,0)
                Else
                    rt.Cells(t - p * prs + 2, 11).Text = 0
                End If
                If money > 10 Then
                    rt.Cells(t - p * prs + 2, 10).Text = GetDigit(Money,1)
                Else
                    rt.Cells(t - p * prs + 2, 10).Text = 0
                End If
            End If
            Dim money1 As Integer = tb.rows(t)("贷方发生额")
            If money1 > 0 Then
                For i As Double = 20 To 13 Step - 1
                    rt.Cells(t - p * prs + 2, i).Text = GetDigit(Money1,20-i)
                    If rt.Cells(t - p * prs + 2, i).Text =  "¥" Then
                        Exit For
                    End If
                Next
                money1 = (tb.rows(t)("贷方发生额") - money1) * 100
                If money1 > 0 Then
                    rt.Cells(t - p * prs + 2, 22).Text = GetDigit(Money1,0)
                Else
                    rt.Cells(t - p * prs + 2, 22).Text = 0
                End If
                If money1 > 10 Then
                    rt.Cells(t - p * prs + 2, 21).Text = GetDigit(Money1,1)
                Else
                    rt.Cells(t - p * prs + 2, 21).Text = 0
                End If
            End If
            rt.Cells(t - p * prs + 2,23).Text = tb.rows(t)("汇款银行")
            rt.Cells(t - p * prs + 2,24).Text = tb.rows(t)("款项来源")
        End If     
    Next

 

 


 回到顶部
总数 14 上一页 1 2