Results 1 to 2 of 2

Thread: Printing web reports

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769

    Printing web reports

    I would have a web report generated from asp. I would like the report to be printed with a header and a footer on each page when the user prints a hard copy.

    How could I do this? Are there special tags that I should use, or do I need some sort of control?

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    Use different style sheets for printing
    Code:
    <html>
    <head> 
    <LINK media=screen href="style.css" type=text/css rel=stylesheet>
    <LINK media=print href="print.css" type=text/css rel=stylesheet>
    </head>
    <body>
    <div class="printOnly">
    HEADER TEXT
    </div>
    Text to be displayed
    
    <div class="printOnly">
    FOOTER TEXT
    </div>
    
    </body>
    </html>
    in style.css:
    Code:
    .printOnly{
    	DISPLAY: none
    }
    Hope this helps
    Mark
    -------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width