locked
printing "drill thru/down" result. RRS feed

  • Question

  • I have a chart that has detail data.  When I right click the chart, it will show the detailed data.

    Is there a way to put a print button in that new pop-up to print the chart?

    I am new and would like a step by step on it.

    Thanks.


    -- IBM has jobs for USA employee to work oversea (India) and get their wages.

    Sunday, July 14, 2013 10:46 PM

Answers

  • Well, is this a custom chart that you have created on your own? I am presuming that it opens up in something like an iFrame? You may add the following script within the HTML of your popup. This uses the jquery toolkit to create the print button and underlying functionality

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type="text/javascript"></script>
     
    <script>
     
    $(document).ready(function() { 
    
      $(‘.printMe’).click(function() { 
      window.print(); 
      return false; 
      }); 
    
    });</script>
     
    <style> 
    .printMe{ 
        color:#666666; 
        font-weight:bold; 
        cursor:pointer; 
    }
     
    .printMe:hover{ 
    color:#333333; 
    font-weight:bold; 
    cursor:pointer; 
    } 
    
    </style>
     
    <button class="printMe">Print</button>
    

    If you are not using a custom content then you may add a content editor webpart to your page, copy the above code into a text file and store it within the documents library of your site, then create a reference to the text file from within the added webpart. This will create a Print button on the page.

    Please refer to the following for more details:

    http://chayadigital.wordpress.com/2013/02/19/add-a-quick-print-button-to-a-form-display-in-sharepoint-2010-using-simple-jquery-snippet/

    Do let me know if this works and if I got you right. I have tried this and it has worked perfectly for me.

    Thanks,

    Vishal

    • Marked as answer by Entan Ming Thursday, July 18, 2013 10:12 AM
    Monday, July 15, 2013 6:38 AM