Hi, I am trying to print a grid view and a graph which are placed on a single aspx page on one single page.
At the moment I am able to print the grid view using the following code, however I am unsure how to print the graph and gridview together.
<asp:Button ID="btnPrint" Runat="server" Text="Print Results " OnClientClick="printItn();"
onclick="btnPrint_Click" /
The ID of graph which I am tring to print is Chart1.
I welcome your suggestions, thank you for your help.
At the moment I am able to print the grid view using the following code, however I am unsure how to print the graph and gridview together.
<script type="text/javascript" >
function printItn() {
var prtGrid = document.getElementById('<%=GridView2.ClientID %>');
prtGrid.border = 0;
var prtwin = window.open('', 'PrintGridViewData', 'left=100,top=100,width=1000,height=1000,tollbar=0,scrollbars=1,status=0,resizable=1');
prtwin.document.write(prtGrid.outerHTML);
prtwin.document.close();
prtwin.focus();
prtwin.print();
prtwin.close();
}
</script>
<asp:Button ID="btnPrint" Runat="server" Text="Print Results " OnClientClick="printItn();"
onclick="btnPrint_Click" /
The ID of graph which I am tring to print is Chart1.
I welcome your suggestions, thank you for your help.