具体DataEnvironment用法，没有太深的研究,我们在遇到分组情况时，是这样解决的,您可以参考一下: 
    1.声明ado connection 
    adoConnection.Open "PROVIDER=MSDataShape;Data PROVIDER=MSDASQL; 
     DSN=;uid=;pwd=;" 
    2.声明分层Recordset: 
     Query="SHAPE {SELECT * from Table1 AS Command1 APPEND ({SELECT * from Table2 AS Command2 RELATE 
     table1.field1 TO table2.field1,table1.field1 to table2.field2 ....) AS Command2" 
     adorecordset.open strquery , ... 
    3.在sql语句你可加入查询条件. 
    4.向DATA REPORT中添加参数: 
     我不太明白你所说的向DATA REPORT中添加参数的意思 
     如果是向某一个session中加入值: 
     例: 
     DataReport.Sections(section序号).Controls(控件序号).Caption = 记录集.fields（"字段名") 
<END>