print out datagrid from web pages

  • Thread starter Thread starter Juan Gabriel Del Cid
  • Start date Start date
J

Juan Gabriel Del Cid

Is it possible to create a print() function that prints
out the datagrid or somekind of report created base on
the datagrid?

Well, the best you could do in this case is use javascript to print the
current document:

<html>
<head>
<title>Reports</title>
<script language="JavaScript"
function printMe() {
PrintMeStr.style.display = "none";
print();
PrintMeStr.style.display = "";
}
</script>
</head>

<body>

<!-- your report stuff here -->

<p id="PrintMeStr">
<a href="javascript:printMe()">Print this report</a>
</p>

</body>
</html>

Hope that helps,
-JG
 
I have a datagrid that displays data in a web page. Is it
possible to create a print() function that print out the
datagrid or somekind of report created base on the
datagrid? I know if it is a window form, it can be done.
But this is on the web page. Thanks
Holly
 
Back
Top