Search This Blog

Wednesday, October 6, 2010

Print a single List item in SharePoint 2010

How to print a single list item in SharePoint 2010

Category: SharePoint 2010


You may need to print a single list item in SharePoint 2010. However, this functionality does not exist unless you print with Excel, which isn't what you are looking for anyway.


So, how do we go about accomplishing this?

  1. Open a List
  2. Hit the List tab
  3. Click the Form Web Parts dropdownlist
  4. Choose “Default Display Form”
  5. At the top of the Page – Insert Tab, Click the Web Part button to add a new Content Editor web part (CEWP).
  6. From Categories choose “Media and Content” > “Content Editor” and add it to the main section of the page.
  7. Click the “Click here to add content” and then click the HTML button in the Ribbon to bring up the Edit source code window.
  8. In the window add the following code to display a Print Button at the top of the list item window.
    <code>
        <input type="button" value=" Print this page " onclick="window.print();return false;" /> 
    </code>

  9. Ignore any warnings.

  10. Next, hit the Page tab at the top of the page to view the List item. You should see the Print button.

  11. Hit the Print button to print just the list item.
So there you go, with just a little tweaking you can print a single List item.

Any questions please just ask.

Derek






























13 comments:

  1. Great and simple!
    However I have a multiline textbox in the form and the right margin gets cut. Any ideas?

    ReplyDelete
  2. your solution is simple by simple i mean it doesn't resolve any real world problem sets

    ReplyDelete
  3. You made my day. Thanks you so much.

    ReplyDelete
  4. I don't see a print button anywhere.

    ReplyDelete
  5. Hi Derek, any chance that I can set the print size bigger?

    ReplyDelete
    Replies
    1. Did you find a resolution for this? I have same issue.

      Delete
    2. Did you find a way to "scale to 150%" with the print button?

      Delete
    3. You can just overscale your infopath form...

      Delete
  6. You are the master. You made my day.

    ReplyDelete
  7. Thanks ver much for this. FYI: if you've enhanced your list with Infopath, add the print option to the Item Display Form instead of the Default Display Form.

    ReplyDelete
  8. This worked exactly like I needed it! Thanks for the tip.

    ReplyDelete
  9. Good Stuff!!!

    What if we need to print ALL items in the list with one click with each List Item on a page? How do we accomplish that?

    ReplyDelete