Solved

Windows.print()

Posted on 2006-10-27
5
598 Views
Last Modified: 2008-02-01
Hi,
Im using windows.print() to print my page actually its a pop up page ...but in the printer the page is not priting full i can see half of the page being printed....can any one helpp;...actually its a pop up page   with grid in it ...i can print only half columsn of the grid rest of being is cut ...how do i fix it

this i how i call the pop up page and then use window.print

string PopUpScript = "<script language='javascript'>" +
string.Format ("window.open('Report.aspx?Year={0}&Quarter={1}&REPORT_TYPE={2}',null,'height=400,width=900,scrollbars=yes' );</script>", ddlYear.SelectedItem.ToString(),ddlQuarter.SelectedItem.Text,Request.Params["REPORT_TYPE"]);
Page.RegisterStartupScript("clientuserscript",PopUpScript);
0
Comment
Question by:aspnetdev
  • 2
5 Comments
 
LVL 2

Accepted Solution

by:
Thargol earned 500 total points
ID: 17826739
Change your layout in your report to 100% width and not a pixel. Your popup window is 900px wide. If your reporty is also forced to 900px wide it won't fit on the page, because most browsers use 75 dpi for printing. 900/75 = 12 inch or 27cm. Most pages are only 8 inch or 20cm wide.

So either restrict your report to 600pixels (8 inches) wide or make your give your page a width of 100% and make sure all content can wordwrap.

You can also upgrade your users browsers to IE7 or firefox. Those browsers shrink webpages to fit  the page. But this can lead to very small characters.


0
 
LVL 2

Expert Comment

by:Thargol
ID: 18027062
Hi, TheLearnedOne

I think I earned some points with my answer, because it's mentions two possible solutions to the problem.

Regards,
Richard
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

AJAX ModalPopupExtender has a required property "TargetControlID" which may seem to be very confusing to new users. It means the server control that will be extended by the ModalPopup, for instance, if when you click a button, a ModalPopup displays,…
Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now