dcsimg
www.webdeveloper.com
Results 1 to 6 of 6

Thread: print function in ASP

  1. #1
    Join Date
    Jan 2003
    Posts
    8

    print function in ASP

    Anyone has the sample code of formatting the data from the database and has a print function to print it out nicely in a pre-defined format(i.e. with the colors and fonts)

  2. #2
    Join Date
    Jan 2003
    Location
    Jersey Girl
    Posts
    1,198
    You can format the data output using the usual methods for formatting (font tags or CSS). If the data is contained within a table, CSS is probably the quickest method.

    As far as printing - you'll need Javascript for that - or the browsers print feature (and the formatting of the printed version will mimic that of the page version - no additional definition of formatting required).

    Did I understand your question properly?
    k

  3. #3
    Join Date
    Jan 2003
    Posts
    8
    I try to display the data in table format on the screen, since I retrieve data more than the browser can view in one page, the horizontal scroll bar of the browser appears, but when i click the print, it only prints out what i can see on the screen only, instead of the whole table, i m afraid if i wrote javascript for this, it will only print out part of the table as i see in the browser(without scrolling), do u have any suggestion for that?

  4. #4
    Join Date
    Jan 2003
    Location
    Jersey Girl
    Posts
    1,198
    Actually I don't.
    I did a quick test with data that I knew would exceed the scroll area and then I printed the result.
    Netscape printed only what could be seen.
    IE printed every record.
    I never realized this.
    I also don't understand it.
    ?

  5. #5
    Join Date
    Jan 2003
    Posts
    8
    What version of IE are you using? what happens to the print output if it exceed the scroll area? print into two pages?
    Anyways, the requirement is to print it in Netscape, do u think it's normal to print reports in browser or use some reporting tools to do the job?

  6. #6
    Join Date
    Jan 2003
    Location
    Jersey Girl
    Posts
    1,198
    My IE is 5.5

    My data printed on 2 pages (although my example had vertical scroll bars (my data was long), not horizontal scroll bars (yours is wide).

    I still don't understand this, but you should be able to print all of the data. You will eventually need to make sure that your data fits in landscape format (or it will be tough on the reader).

    I'm almost certain that I did not have this problem with printing data in the past, but I can't recall the circumstances of the data and how it was handled.

    I'll look into it more, I guess.
    k

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles