我正在尝试使用下面的代码打印我的报表查看器报表,我收到一条错误,指出Microsoft JScript运行时错误:无法获取属性'get_isLoading'的值:object为null或undefined。有什么想法吗?
<script language="javascript">
function PrintReport() {
var viewerReference = $find("ReportViewer1");
var stillonLoadState = viewerReference.get_isLoading();
if (!stillonLoadState) {
var reportArea = viewerReference.get_reportAreaContentType();
if (reportArea == Microsoft.Reporting.WebFormsClient.ReportAreaContent.ReportPage) {
$find("ReportViewer1").invokePrintDialog();
}
}
}
</script>
答案 0 :(得分:0)
ctl00_ContentPlaceHolder1_ReportViewer1是控件的名称