HEIDI
April 5th, 2000, 12:49 PM
I am trying to create a data report in a data environment, but I cannot seem to figure out how to get the parameters for the report. I am creating a report based off three tables that require the data for the past tweleve months. I need to get the month and year that the user is reporting on then base that on what dates I need for my where statements.
Could someone please help??
nakeshkamat
April 6th, 2000, 01:31 AM
Try the following:
modify the commandtext property of the command object at runtime
eg
Dataenvironment is dataenvironment1
connection is connection1
command is command1
try the following code
dataenvironment1.commands("command1").commandtext = strsql
dataenvironment1.rscommand1.open
where rscommand1 is the recordset object of the command and
strsql = the SQL statement containing the parameters
eg Strsql = "select * from categories where categoryID = " & text1.text & "
Hope this will solve your problem
Regards,