...

View Full Version : Changing print settings?



m_baggley
05-23-2005, 03:26 PM
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

Kor
05-23-2005, 03:36 PM
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....

jbot
05-23-2005, 03:48 PM
use CSS paged media for those reports so that the pages will automatically print in landscape. :rolleyes:

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. :thumbsup:

m_baggley
05-23-2005, 04:12 PM
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

jbot
05-23-2005, 04:53 PM
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 :)

m_baggley
05-23-2005, 04:57 PM
I'll test it out tomorrow. :thumbsup:

Cheers

matt

jbot
05-23-2005, 08:05 PM
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.

jbot
05-23-2005, 09:37 PM
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.

m_baggley
05-24-2005, 09:53 AM
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

m_baggley
05-24-2005, 10:42 AM
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

jbot
05-24-2005, 11:22 AM
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 (http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/hosting/printpreview/reference/reference.asp)

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 (http://www.codingforums.com/showthread.php?t=36848).

good luck :thumbsup:

glenngv
05-24-2005, 11:35 AM
As of the moment, I think only Opera supports the @page rule (http://www.nic.fi/~tapio1/Teaching/Fontit1b.php3).
I tried this in IE6, Firefox, and Opera.


<style type="text/css" media="paged">
@page {
size: portrait;
}

and only Opera is happy about it.

jbot
05-24-2005, 11:42 AM
<style type="text/css" media="paged">
@page {
size: portrait;
}


should be:




<style type="text/css" media="print">
@page
{
size: portrait;
}


... because there is no "paged" media value.

glenngv
05-24-2005, 11:55 AM
I was looking at the media groups and not media types. But nonetheless, still only Opera supports @page rule.

jbot
05-24-2005, 12:03 PM
still only Opera supports @page rule.

yeah, you're correct: browser support (http://www.westciv.com/style_master/academy/browser_support/printing.html).

oh well, back to the drawing board. :rolleyes:

glenngv
05-24-2005, 12:21 PM
If this is for intranet site (which seems it is) and the target browser is IE5.5+, m_baggley can use Print Templates (http://search.microsoft.com/search/results.aspx?view=msdn&st=b&na=82&qu=print+templates&s=1&swc=4).



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum