问题描述
- jsp页面怎么通过javascript传参数给birt view报表
-
jsp页面核心代码如下:<script type = "text/javascript" > function search(){ var dzbm='10003'; window.location.href="frameset?__report=reports/new_report_2.rptdesign&__format=HTML&dzbm="+dzbm; } </script > <body> <input type = "button" value = "查 询 " onclick = "search()" > <br> <iframe width="900" height="600" frameborder="1" src="<%= path + "/frameset?__report=reports/new_report_2.rptdesign&__format=HTML&dzbm=10003" %>"></iframe> </body>
报表页面数据集sql如下:
select * from pvdb.逆变器实时数据表
where 逆变器信息列表_组列表_电站编码='dzbm'
但是这样运行时报表取不到数据,参数没传过去,不知道是什么问题,需要大家协助
解决方案
jia qun 482547245
解决方案二:
这是jsp页面吗 ?为什么要使用转义字符拼写 ,直接这样写呢
function search(){
var dzbm="10003"
window.location.href=frameset?__report=reports/new_report_2.rptdesign&__format=HTML&dzbm=dzbm;
}
解决方案三:
这是jsp页面吗 ?为什么要使用转义字符拼写 ,直接这样写呢
function search(){
var dzbm="10003"
window.location.href=frameset?__report=reports/new_report_2.rptdesign&__format=HTML&dzbm=dzbm;
}
解决方案四:
是设置iframe的id吧。。?
<script type = "text/javascript" >
function search(){
var dzbm='10003';
document.getElementById('myifr').src = "<%= path>/frameset?__report=reports/new_report_2.rptdesign&__format=HTML&dzbm=" + dzbm+'&_dc='+new Date().geTime();//加时间戳防止缓存
}
</script >
<body>
<input type = "button" value = "查 询 " onclick = "search()" > <br>
<iframe id="myifr" width="900" height="600" frameborder="1" src="<%= path + "/frameset?__report=reports/new_report_2.rptdesign&__format=HTML&dzbm=10003" %>"></iframe>
</body>
时间: 2024-09-03 19:40:27