Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    New Coder
    Join Date
    Feb 2005
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Changing print settings?

    Hi folks,

    We are running a SQL database that runs reports onto an .ASP page. The information is pretty heavy and every report requires printing using landscape and background colours.

    Does anyone know a way of scripting the page so that when a user prints a page, they don't have to change the settings. The reason being is that most people don't think to do this and as such is fustrating and paper wasting (the reports look awful on portrait even though they are designed to fit on the screen)

    I realise that some people will say that the users should just learn to change the settings, but many different people run many different reports and it seems stupid that each and every time they need to change the settings just to accommodate these reports.

    And before anyone asks, I have no knowledge of JS at all so please a please please help. I have had a look at few of the JS sites and can't find any free scripts.

    Thanks

    Matt

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    I realise that some people will say that the users should just learn to change the settings, but many different people run many different reports and it seems stupid that each and every time they need to change the settings just to accommodate these reports.
    You said it. There is no way to interfere with user's settings (because of obvious security reasons). Users should learn how to set their printing settings. There is nothing you can do. Unless maybe insert al alert or a visible advice to be careful when seting their printers....

    Or build your reportpages in such a way than they are to be printed the same with default printer settings....
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #3
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    use CSS paged media for those reports so that the pages will automatically print in landscape.

    anyway, the question has been asked before, producing as it did, a rather lively discussion. you could always search for the thread, and see the flames ... er, i mean suggestions, for yourself.
    *keep it simple (TM)

  • #4
    New Coder
    Join Date
    Feb 2005
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I think I will

    Thanks jbot, could you point me in the right direction for the CSS paged media please?

    Meanwhile I'll have a search for the controversial thread!

    Cheers

    Matt

  • #5
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by m_baggley
    Thanks jbot, could you point me in the right direction for the CSS paged media please?
    just google on the bold text ... those are all the keywords you'll prolly need
    *keep it simple (TM)

  • #6
    New Coder
    Join Date
    Feb 2005
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    found it!

    I'll test it out tomorrow.

    Cheers

    matt

  • #7
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    please note, writing-mode is IE only and is therefore not a solution. in fact, it's not even pertinet, since all it does is change the direction of printed text. the other solutions are Ie only too.
    *keep it simple (TM)

  • #8
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Cranford
    check your spelling before using such a narcissistic word like pertinent.
    hark at you. more cream for miss cranford. ooops, i typoed, ie failed to include the 2nd letter "n". how dare I make such a faux pas.

    yes, googling isn't a genuine solution, but it does help forum users to get on the right track. but giving them the false code doesn't help either.
    *keep it simple (TM)

  • #9
    New Coder
    Join Date
    Feb 2005
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    guys guys,

    I really didn't want this to start off any arguments. Anyway I couldn't reply till I got to work so apologies for not getting back to you.

    Cranford, the output from the SQL database comes out in table format (no divs) so which of your solutions can be best fit to what I need?

    Cheers

    Matt

  • #10
    New Coder
    Join Date
    Feb 2005
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    and in addition

    sorry I have another question referring to your answer jbot. The paged media appears to use CSS2. now I have been told that most IE does not support these functions. Is that true and is there a workaround? anyone?

    Matt

  • #11
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by m_baggley
    The paged media appears to use CSS2. now I have been told that most IE does not support these functions. Is that true and is there a workaround?
    yes, paged media are CSS2 and presently IE does not support it. but you should still use it in your site/application for the future.

    now, whether IE7 will remains open to question, but we can only hope, since there's no doubt that it would be a massive improvement. this, i believe, is how IE can currently cope with print templates, which, as you can see, there's a lot to digest: MSDN

    however, it would still be best leaving it up to the user to adjust their print settings properly, rather than try and over-ride them. if in doubt, then read this thread.

    good luck
    *keep it simple (TM)

  • #12
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,075
    Thanks
    0
    Thanked 256 Times in 252 Posts
    As of the moment, I think only Opera supports the @page rule.
    I tried this in IE6, Firefox, and Opera.

    Code:
    <style type="text/css" media="paged">
    @page {
      size: portrait;
    }
    and only Opera is happy about it.
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #13
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by glenngv
    Code:
    <style type="text/css" media="paged">
    @page {
      size: portrait;
    }
    should be:


    Code:
    <style type="text/css" media="print">
    @page 
    {
      size: portrait;
    }
    ... because there is no "paged" media value.
    *keep it simple (TM)

  • #14
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,075
    Thanks
    0
    Thanked 256 Times in 252 Posts
    I was looking at the media groups and not media types. But nonetheless, still only Opera supports @page rule.
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #15
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by glenngv
    still only Opera supports @page rule.
    yeah, you're correct: browser support.

    oh well, back to the drawing board.
    *keep it simple (TM)


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

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