Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 8th, 2004, 07:13 AM
Authorized User
 
Join Date: Aug 2003
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Default Printer Friendly / Crystal reports

Hi all,

I have a page in which i display data using datagrid.
On the top of this page there is a printer icon, clicking on it opens a new page which displays the same data as in the previous page but in a printer friendly format. This page will also have a printer, clicking on which should start the printing process.
But the "printer" image should not appear in the printout. Is it possible ? If not then should i implement it using crystal reports ?

thanks in advance

Vinay

 
Old December 16th, 2004, 08:59 AM
Friend of Wrox
 
Join Date: Dec 2004
Posts: 307
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Vadivel Send a message via Yahoo to Vadivel
Default

Vinay,

You can make use of "window.onBeforePrint" and "window.onAfterPrint" event to achieve this.

In window.onbeforeprint --- set the visibility of that button to false .. then on onAfterPrint set it back to true. I guess these events are available from IE 5.0+

For your easy reference:
http://msdn.microsoft.com/library/de...dhtmlprint.asp

Best Regards
Vadivel

MVP ASP/ASP.NET
http://vadivel.thinkingms.com
 
Old December 16th, 2004, 09:30 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Alternatively, use CSS with the media attribute set to print, as explained here:

http://Imar.Spaanjaars.Com/QuickDocID.aspx?QUICKDOC=240

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Printer Friendly Web Page [email protected] ASP.NET 1.0 and 1.1 Basics 0 May 17th, 2006 01:08 AM
How to Create Printer Friendly Page? qadeerahmed Classic ASP Basics 1 August 17th, 2005 05:56 PM
Printer friendly reports from JSP page. ngsaran Crystal Reports 0 October 19th, 2003 05:10 PM
To send reports direct to the printer magesh_bala Classic ASP Professional 2 September 4th, 2003 04:00 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.