Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable Header and Footer info when printing from browser

Status
Not open for further replies.

jimoo

Programmer
Jun 2, 2003
1,111
0
0
US
We have a ASP.NET app that creates a report using XMLSL. It works fine, and the report appears in the users browser for them to print.

Some users have the default File / Page Setup options in the header and footer so the header and footer is printed on the report. They can, of course, clear this prior to printing.

However, a preferred method would be for us to capture their current setting (local pc) change the setting so no headers and footers are displayed, then reset the header and footers after printing...

I realize this is a trick request since the APS NET app is running a websever and the printing is done at the user pc using local resources...

Thoughts on how to accomplish this or is the solution simply a training issue. I.E. teach the user to turn them off and back on again if they want header / footers.

Jim
 
I don't think this is possible, but if it is at all, it would have to be done client side. I would check in the javacript forum to see if it is possible.
 
you cannot control the user's print settings from the server, or javascript. you would need to develop a silverlight (or active x) component which the user would need to install locally. you could then use this client component to control printing options.

How exactly, I'm not sure, but this is where you would need to start.

Jason Meckley
Programmer
Specialty Bakers, Inc.

faq855-7190
faq732-7259
 
That's true. Javascript would just open the print dialog window and they would still have to manually change the settings.
 
Thanks everyone for all your input. It was very helpful.

It turns out we were able use the ReportViewer Control and render these reports. The report(s) render in clean manner without the browser page header and footers.





Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top