After attempting to print my report viewer report using the code provided, I encountered a Microsoft JScript runtime error: Unable to get value of the property 'get_isLoading': object is null or undefined. Does anyone have any suggestions on how to resolve this issue?
<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>