Birt报告参数传递

时间:2013-09-21 05:05:44

标签: oracle birt

您好我必须将参数传递给报告...使用concat-date ....但是它显示错误... 像这样......我在2011-2012,2012-2013的列表框中...这里是我的oracle查询

DATE FOMART IN DATABASE:25-Mar-2012 

oracle query
select tran_date,
ROUND (nvl(sum(WALKIN_WITHOUT_CGROUP),0)/ COUNT(*),2)APC
from OUTLET_PAYMODE_REPORT_FACT 

Before Open:
var sqld= new String();
yearParam = params["Year"].value;
yearParam = yearParam.split("-");
startYear = yearParam[0];
endYear = yearParam[1];

this.queryText =this.queryText +" where TRAN_DATE between '" + startYear + "01-Mar-' and '" + endYear + "30-Mar-'"+
"group by tran_date"

但是我得到这样的错误......

 org.eclipse.birt.report.data.oda.jdbc.JDBCException: SQL statement does not return a ResultSet object.
SQL error #1:ORA-01861: literal does not match format string

1 个答案:

答案 0 :(得分:0)

我认为,你的sql字符串应该是

" where TRAN_DATE between '01-Mar-" + startYear + 
                   "' and '30-Mar-" + endYear + "' " + 
"group by tran_date"