I created a JavaScript function to print the content of my iFrame.
<a href="#" onclick="printBGReport();" align="center">Print Report</a> <br/>
<script>
function printBGReport(){
var content = document.getElementById("printBGReport").innerHTML;
var mywindow = window.open('', 'Print', 'height=600,width=800');
mywindow.document.write(content);
mywindow.document.close();
mywindow.focus()
mywindow.print();
mywindow.close();
//return;
}
</script>
<div id="printBGReport">
<iframe id="reportBGID" name="reportBGID" src="myiFrameURL" width="900" height="1000" align="center" target="_self" valign="top" scrolling="yes" frameborder="no">
</div>
However, it is not printing all the content. Looks like it is just print the first page. Does anyone know why?
Thanks