【发布时间】:2017-08-03 12:55:25
【问题描述】:
我正在尝试使用 Jquery 将带有参数的 SSRS 报告加载到 IFrame 中。我正在使用 Iframe 的 Form 目标加载到 Iframe 中,但它会在新窗口中打开它。
HTML代码
<iframe id="SSRSReportIFrame" class="modal-fix-height" ></iframe>
<form id="SSRSParamPostForm" action="" method="post" target="SSRSReportIFrame"></form>
jQuery 代码
var paramPostForm = document.getElementById("SSRSParamPostForm");
paramPostForm.action = ReportViewerPath + '?rc:Toolbar=true&rc:Parameters=Collapsed&rs:Command=Execute&' + ReportName;
paramPostForm.target = "SSRSReportIFrame";
postParamValues.forEach(function (param) {
//Adding paramters values as hidden controls
});
paramPostForm.submit();
或以其他方式加载参数 SSRS 报告以加载到 Iframe 中,除了将参数添加到查询字符串中。
【问题讨论】:
标签: jquery html iframe model-view-controller reporting-services