Getting Print event

2 posts, 0 answers
  1. Rahul Khinvasara
    Rahul Khinvasara avatar
    303 posts
    Member since:
    Aug 2007

    Posted 12 Dec 2007 Link to this post

        In my project I have one telerik report viewer and two telerik text Editor. Right now for printing the report the user needs to click print button of respective control.
         I am using the telerik text editor for printing the data since telerik reporting tool does not supports html.
    Now I want to have a common print button . On clicking it I  want to print text from report viewer , and text from 2 text Editor.
        The user will click on one button and the text from all the controls will get printed.
      For this I found the sample code from telerik forum
    which suggests to use the following javascript function on print button:
    <form id="Form1" method="post" runat="server">
     <script type="text/javascript">
     function printRTB()
       var printIframe = document.createElement("IFRAME");
      var printDocument = printIframe.contentWindow.document;;
      var editorHolderDiv = document.getElementById("editorHolder");
      var theEditorContentHoder = editorHolderDiv.childNodes[0];
     <div id="editorHolder">
     <rade:radeditor id="RadEditor1" editable="true" runat="server" saveinfile="false" haspermission="false">test test test</rade:radeditor>
     <input type="button" id="btnPrint" OnClick="printRTB();" value="Print">

    Can I print the data from report viewer using the above code?

  2. Svetoslav
    Svetoslav avatar
    649 posts

    Posted 15 Dec 2007 Link to this post

    Hello Rahul Khinvasara,

    Please see this forum thread that we discussed a similar to your question.

    Kind regards,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top