VB中,用sum()函数进行汇总得到的数据如何在VB报表或水晶报表中打印出来?

解决方案 »

  1.   

                str = " select count(*) as idofcount,sum(case when s5<>'重汽' then c1 else 0 end ) as dzw from 明细表 where glid=" & Val(glid) & " and username='" & ComputerName & "'"
                snp.Open str, cn
                If Not snp.EOF Then
                    rptform!Report1.Formulas(3) = "num='" & Val("" & snp("idofcount")) & "辆,吨位是:" & Format(Val("" & snp("dzw")), "0.00") & "吨。'"
                Else
                    rptform!Report1.Formulas(3) = "num=" & ""
                End If
      

  2.   

    给你一本帮助,自己学习吧
    http://download.csdn.net/source/1921500