PDA

Click to See Complete Forum and Search --> : Data Report


RAMESH_R
Dec 26th, 1999, 07:05 PM
I am using the DataReports for the first time. and I am finding it difficult to create Reports dynamically at runtime ,
i.e.: I am not able to pass a parameter to the report at run time.
Could you please help me out.
by giving me some details about using the param1.
This is what i have Done.

**I Checked for the datatype of parameter with the name
"param1" in command properties.It is same type as of variablename or the value i am passing.

***I Checked for sql statement there.It is
something like this....

select * from table where fieldname=? <-- space is must after ?

In the DataReport initilization event i have this line of code
" Dataenvironment1.Commands("Command1").Parameters.Item("Param1").Value= form1.text1.Text "

I am not getting any errors , I am getting a Blank Report.

Plz help me out.

Thanking You
Ramesh





------------------
NA

Forest Dragon
Dec 28th, 1999, 03:21 AM
Follow these steps:

1. In the data environment, right-click the command object which contains the query for the report and select the properties option (the last option in the menu).

2. Go to the parameters tab and add your parameter.

3. When you want to display the report, use this code:

DataEnvironment1.Command1 Parameter-value
DataReport1.Show

Good Luck!!!

wisa
Feb 16th, 2000, 03:46 PM
To forest dragon
i m not lucky for ur suggestion...
because there s no option to add my parameter in the parameter tab
i just found parameter with name "param1".
fyi, my sql statement is "select * from Tabel where FieldName=?"
Now im using VB 6.0 Enterprise version.
Tks a billion for ur help