Follow Us:
Well really there are four methods to print a SharePoint display form, and I’ll give you one method to print InfoPath-customized list forms. If you’ve gotten to this page, it’s because you or your users make heavy use of SharePoint lists, and the inevitable request came up “Ok this is great, but I can’t print this item, help!”. Off to Google we go, and there are a few different solutions out there. Which is best? What do I do? Like most things with SharePoint, there is no one right answer (sometimes there is!), but some are definitely easier than others or better depending on your needs. I'll show you a couple different common solutions out there in one place, and what worked for me.
For the sake of this post, I’m assuming the platform is SharePoint 2010. SharePoint 2007 and especially SharePoint 2013 would have different solutions using the new client-side object model (CSOM).
First, let’s take a look at the InfoPath version. If you use lists a lot then you probably know you can customize a list display/edit/new form using InfoPath. This can give you great flexibility with your form design, and keep things with the site owner in the business instead of having to call IT. Customizing your list with InfoPath is out of scope of this post, but you can follow the basic steps from Microsoft or watch a video from SharePoint-videos.com.
For this solution, most folks I have seen turn to Chris Kent’s solution on codeplex that ONLY works with SharePoint list forms that have been customized with InfoPath. It installed and worked fine, and added a button to the form and printed the form great! However, a very annoying popup “Chris Kent is awesome” kept popping up every time it was printed. We modified the solution code to remove this = happy client! It adds a Print section on the ribbon and Print icon on the actual list item like the image on the right. I have used this, and it filled the need.
The rest of these solutions deal with how to print default SharePoint list items. A couple of these are similar requiring no-code (server side anyway), and one that is a full server-side solution.
I think this is the easiest and takes only a minute to implement. I first saw this mentioned in a TechNet forum post, and I was unable to find it again, sorry to the author! This solutions involves SharePoint Designer to create a custom action on the list. Let’s knock this out:
Go open your list, and open in display form. You should see something like this. It’s not perfect, it’s a little small but it works and took less than 2 minutes. Try it out! You go a little further to clean it up by using some CSS to strip out the top nav and social icons and such using a technique similar to a previous blog I wrote to print a picture library.
There are a couple different flavors of this, but the core solution is the same. Using the SharePoint UI, go to the list, edit the default list form via the ribbon, insert a content editor web part, and either embed the code on the page or call the code via a .txt file that fires the code via a button on the page. If you follow Emerson Bruce’s method for this, she gives some nice CSS to help clean up the view and make it nice for printing.
Jim Parker over at www.nothingbutsharepoint.com did a nice write-up solution where basically we’re doing the same thing, but instead of a button on the page, we stuff the HTML in a calculated column that’s clickable that loads a nice print version that then you can just use your browser File->Print. Nice Jim!
If you needed this on a list of lists, you don’t want to have to edit all these lists, you want to make a feature that just does it. Bob Guidinger put a nice post using a server-side Visual Studio solution. While his example shows attaching to InfoPath list forms, you just need to change the Location and Button ID to work with regular list forms. Again, all of the default ribbon locations are on MSDN.
I saw another post of using Access forms to do this, however, how do I say this … no thanks. But for thoroughness, the link is provided. I hope this helps show the different ways folks in the community have come up with to address this need, and you try them out and find the one that works for you.
For more information on C5 Insight or this blog entry, please Contact Us.
Hi, The link is not working for Infopath edited forms. Please update the link. Thanks
How did you remove the Chris Kent popup?
Eugene, While I didn't remove it, one of our developers did, you will have to use Visual Studio, make a change to the code and re-compile the solution. Under InfoPathPrinter in the elements.xml, this line is causing in the CommandUIHandlers section: SP.UI.Notify.addNotification('Chris Kent is Awesome!'); Remove it, recompile, deploy and you should be good. Doug
Thanks for the reply. I was able to extract the files, edit elements.xl and then use makeddf to re-create the wsp.
Thanks for linking to my blog! I've updated my post so the solution works with SharePoint 2013, and also updated the XML so it adds to button to standard list forms.
Hello, I really need this option to work with my project i have followed step by step and it does not work. I am sure i am missing a piece... Please help me... Thanks, Alejandro
Thanks for linking to our video at SharePoint-Videos.com. Hope the readers find it useful!
The complementary paper includes over 12 years of research, recent survey results, and CRM turnaround success stories.
Request Download
This 60-second assessment is designed to evaluate your organization's collaboration readiness.
Learn how you rank compared to organizations typically in years 1 to 5 of implementation - and which areas to focus on to improve.
This is a sandbox solution which can be activated per site collection to allow you to easily collect feedback from users into a custom Feedback list.
Whether you are upgrading to SharePoint Online, 2010, 2013 or the latest 2016, this checklist contains everything you need to know for a successful transition.