hello,my english is pool,
but i would try to make it clear to you
first,create a new table called "dual" in your sql
database,suppost the datebase is called "test",
just one column in the table "dual",
full one datetime recode such as "2007-01-01" in it
you can use any date,it's not important.
suppost that you have set up a dateset
and the sql is:
select count(*)
from product
where sales_date=@tj_date
and @tj_date is the parameter
turn to the "data" item
add a new dataset,"name" item is "rdate"
"Query sting" is the sql
"select getdate()-1 from dual"
or "select '2007-10-27' from dual"
turn to "layout" page item,find and click "report
parameters"
a setting box would come out
if every thing's right,you will find the parameter "@tj_date",
and "Default values" choose "From query"
and you will find "rdate" in the list,just choose it.
ok build your program, it's what you want.
|