473,395 Members | 1,701 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

print out datagrid from web pages

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

Nov 15 '05 #1
1 1473
> 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
Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Billy Jacobs | last post by:
I have a datagrid which I am using as a report in a web application. When I go to print the page from Internet Explorer, the gridlines on the first page print but on subsequent pages the gridlines...
1
by: Paresh | last post by:
Hi I need to Print asp:datagrid with formatting, which will avoid my writing of crystal reports and can directly print with click of a button. I do not just want to print the current page, I...
2
by: enak | last post by:
I can not get my datagrid to page. I have a datagrid that I can sort 2 of the columns. This works great. I added paging and when I display the dg it shows 5 pages. (I am showing page numbers at...
0
by: Paco Ferre | last post by:
Hello, I founded some examples of WebControl printing in internet and tryed to have them working for a DataGrid, something not very complicated. I have a page, Page1.aspx with a DataGrid...
5
by: Jay | last post by:
In an ASP.NET page I have a fairly lengthy datagrid that I need to print. Problem is that when I print sometimes the last row on that page gets cut half way through. Is there a way to print a...
2
by: Daniel | last post by:
Hey guys When i print preview a datagrid in IE i find the first page shows the grid lines of the grid, and prints them, but all pages after page 1 don't. Any ideas why? Also it will not print...
11
by: Wendy | last post by:
Hello, I have a program that does the following: When a user clicks on a row in a VB.NET datagrid, it will open a web page in Internet Explorer (that corresponds to that item in the selected row...
0
by: Vitor Mata | last post by:
Please help me on this one... I have one page with one datalist ...and on the item template i have one datagrid ... by other words one datalist populating one datagrid... everything is working...
1
by: Sam | last post by:
Hi All I have a web page that contains a datagrid and in this data grid, I have a checkbox column template which allow user to select one or more applicant's loan applicantion to print....
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.