# Re: 如何传值到报表

Posted by 小尼 on October 22, 1999 at 00:05:59:

In Reply to: 如何传值到报表 posted by Ling on October 21, 1999 at 23:34:29:

: 我是利用dataenvironment和datareport做报表，我在dataenvironment下的command条件有参数，在datareport利用此command来显示资料，但无法传递参数

With envReport
.Commands("cmdCargo").Parameters(1).Value = mOpt_S
.Commands("cmdCargo").Parameters(2).Value = mMno
.Commands("cmdCargo").Parameters(3).Value = mFno
.Commands("cmdCargo").Parameters(4).Value = mF_Date
.Commands("cmdcargo").Parameters(5).Value = mOpt
lngRecordCnt = .cmdCount1(mOpt_S, mMno, mFno, mF_Date, mOpt)
End With
试试看吧~
envReport是dataenvironment的name
cmdcargo是command的name
parameters(1)是指第一个参数

Follow Ups:

- 经Test发现,parameters(0)才应是第一个参数(NoText)..... 大汉堡 19:36:13 10/22/99 (0)