Click here to Skip to main content
15,884,836 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am working in a report a page. A JavaScript function is used to print to page. But in the printed version of the report some portion of the report is not coming. What may be the probable reason of this issue??
Here is the JavaScript function:
JavaScript
function doprint()
			{
				document.all('btnPrint').style.visibility =  'hidden';
				document.all('btnClose').style.visibility =  'hidden';
				try
				{
					if (factory == null)
					{
					     window.print();
					}
					else
					{
						if (factory.printing == null)
						{
						    window.print();
						}
						else
						{
							var h = factory.printing.header;
							var f = factory.printing.footer;
							//set header and footer to blank
							factory.printing.header = "";
							factory.printing.footer = "";
							//print page without prompt
							factory.DoPrint(false);
							//restore user's info
							factory.printing.header = h;
							factory.printing.footer = f;
						}
					}  
				}
				catch(e)
				{
					window.print();
				}
       
				//show the print and close button
				document.all("btnPrint").style.visibility = 'visible';
				document.all("btnClose").style.visibility = 'visible';
			}

Thanks in advance
Posted
Updated 14-Feb-11 18:56pm
v2

1 solution

What may be the probable reason of this issue??
It might be that the report designed does not fit in the page layout or printer page size.

Make sure that the report content is within a limited boundary and can be printed in the sheet.
 
Share this answer
 
Comments
Rounak Hasan 15-Feb-11 12:17pm    
Thanks for the help.I have checked the design. The whole report is within a main html table and width attribute of the table is set to 100%.What should I check in the design????
Sandeep Mewara 15-Feb-11 12:20pm    
You can try putting dark defined borders and back colors to start of. This would tell what excatly and where it's getting cut off.
Rounak Hasan 17-Feb-11 0:59am    
This problem has been solved ...there are some error in that that HTML....Some tags were not closed...I have rectified all these errors..Now it is ok...But I cant find the exact reason.....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900