DataEnviroment太不好了,所以不用他,而直接用rs对象。

解决方案 »

  1.   

    http://www.playyuer.com 提供
    《vb 6之数据报表使用技巧》
    http://media.ccidnet.com/media/ciw/871/b1301.htm
    《VB6之Data Report全面解决方案(1)》
    http://microinfo.top263.net/Txt/DRptPlus.txt
    《巧用 VB6 之 Data Report 实现图片(Picture)、图表(MsChart)的打印及预览》
    http://microinfo.top263.net/Txt/ImageRpt.txt
    下载例程
    http://microinfo.top263.net/Zip/DatGrdRpt.zip
    http://microinfo.top263.net/Zip/ImageRpt.exe
    http://microinfo.top263.net/Zip/FmtDatRpt.zip 
    http://microinfo.top263.net/Zip/ShapeTree.zip 
    http://microinfo.top263.net/Zip/ShapeNew.zip 
      

  2.   

    如果需要,给个邮箱,给你完整例子
    Private Sub cmdShow_Click()
        Dim cn As Object
        Dim rs As Object
        Set cn = CreateObject("adodb.connection")
        Set rs = CreateObject("adodb.recordset")
        cn.open "provider=sqloledb.1;data source=localhost;user id=sa;password=;initial catalog=master;"
        rs.open "select id,name from sysobjects", cn, 1, 1, 1
        drp.Sections("section2").Controls("label1").Caption = "Table ID"
        drp.Sections("section2").Controls("label2").Caption = "Table Name"
        
        drp.Sections("section1").Controls("text1").DataField = "ID"
        drp.Sections("section1").Controls("text2").DataField = "Name"
        Set drp.DataSource = rs
        drp.Show
    End Sub
      

  3.   

    [email protected]谢谢Random(随便)