You are on page 1of 7

Step : 1 At first we take a look (Fig-1) how our Report will look like that will send to the

printer for printing.

Fig : 1

To Make our Report Printer Friendly we have to do the following : Step : 2 Go to your report page property as shown below Fig -2

Fig : 2 Step : 3 Click Show All Tab and go to Display Attributes. Now set your Page template to Printer Friendly as shown in the Fig-3

Fig : 3

Step : 4 Go to Shared Components then select Templates as shown in Fig-4 Here you need to configure few of the template settings that will be required for printer friendly. As example you will remove the logo at the top of the page and User name that shown bottom of each page. In Practical these two are not required in the Printer Friendly pages.

Fig : 4

Step : 5 You can filter your template by using the search parameter as shown in Fig -5 After selecting your searching parameter Press button GO

Fig : 5

Step : 6 Now Click the Printer Friendly as shown in Fig -6

Fig : 6 Step : 7 Go to the Footer section and remove all the text from the Footer and keep it blank as shown in Fig-7. You will do it because you don't want to show the user name at the bottom of the Printer Friendly Pages.

Fig : 7

Step : 8 Now to remove the Logo that by default shown in each page you need to remove it from the Printer Friendly page. Now from your keyboard type Ctrl+F button and you will see a find window. And type as find string LOGO as shown in Fig-8 Remove the whole line of logo <td> as marked in the Fig-8 and save it. Do it as many logo rows you find in this page and save it.

Fig : 8 Step : 9 You have to put 2 buttons in your report page. Print and Close as shown in Fig-9. This print button will send this page to the printer and close will exit from this page.

Fig : 9

Step : 10 To put those buttons in your report page you have to create a new HTML region with the below configuration that shown in fig-10 For Template , Display position and region source Properties follow from the figure 10.

Region Source Text : <table width="100%" cellspacing="0" cellpadding="0" border="0" align="center"> <tr> <td align="right" width="90%"><br><div id="divButtons" name="divButtons"> <input type="button" value = "Print" onclick="printPage()" style="font:bold 12px verdana;"> </div><br></td> <td width="5%" align="left"> <br><div id="divButtons1" name="divButtons1"> <input type="button" value = "Close" onclick="closePage()" style="font:bold 12px verdana;"> </div><br></td> <td width="5%"></td> </tr> </table> Step : 11 You have to create a javascript Function as you typed in the Region Source to send the print command

to the printer when you press the print button.

To put that javascript function go to the HTML header of your print page and type the function code as shown in Fig-11

Fig -11 Javascript function Code text : for print and clsoe button both <script language="JavaScript"> function printPage() { if(document.all) { document.all.divButtons.style.visibility = 'hidden'; document.all.divButtons1.style.visibility = 'hidden'; // document.all.CONFIGURE_29.style.visibility = 'hidden'; window.print(); document.all.divButtons.style.visibility = 'visible'; document.all.divButtons1.style.visibility = 'visible'; // document.all.CONFIGURE_29.style.visibility = 'visible'; } else { document.getElementById('divButtons').style.visibility = 'hidden'; document.getElementById('divButtons1').style.visibility = 'hidden'; document.getElementById('CONFIGURE_29').style.visibility = 'hidden';

//

window.print(); document.getElementById('divButtons').style.visibility = 'visible'; document.getElementById('divButtons1').style.visibility = 'visible'; // document.getElementById('CONFIGURE_29').style.visibility = 'visible'; } } function closePage() { window.close(); } </script>

Note : Here the whole page will go to the printer but the Print and close button will not go to the printer. If you take a look the javascript function you will see how javascript function has prevented these two buttons to go to printer. - Thank you.

You might also like