发新话题
打印

请教管理员,下面的sql语句如何按时间来传递参数

你在 <form> 里设置 两个field,名称在sql定义里引用,就行了。如下所示:
-----------------------------
web 表单写法:
-----------------------------
<form action='reportviewer?file=a.xml'>
<input name='beginDate'/>
<input name='endDate'/>
<form>


-----------------------------
设计器中 sql写法:
-----------------------------
and cb_birthdate >='${beginDate}' and cb_birthdate<='${endDate}' and hd_belongunit is not null
and  hd_belongunit=un_id
and un_cityid = '469022000000'
and hd_inputday-cb_birthdate >=30

TOP

通过url传递参数也可以,如:

iframe.src = "jor/reportviewer?file=a.xml&beginDate=2011-1-12&endDate=2011-12-1";

TOP

发新话题