One of the limitations of Sharepoint is the absence of print feature for the web parts and one has to rely on the browser’s print functionality. How to print a web part in an elegant way?
Workplace Monthly (Looks like the location has moved. Refer to Comments section for an alternate link) has an interesting and well written article for printing web part lists. Only one part of the process is expanded for the benefit of users’ new to Sharepoint. The other steps are well expanded in ‘Workplace Monthly’. It is quite easy to do without the need for Sharepoint Designer. The following are the steps:
(1) Create a Sharepoint List
(2) Copy and paste the code referred in ‘Workplace Monthly’ article. The code will be added to ‘Custom Editor Web part’, How?
Adding Code to Custom Editor Web Part
Ensure that you are in the ‘List’ page to which print functionality is required
- Select Site Actions > Edit Page
- Click ‘Add a Web Part
- Select ‘Content Editor Web Part’ and click the ‘Add’ button. Note that the Web Part is added
- Click ‘edit’ pop-list in the content editor web part added and select ‘Modify Shared Web part’
- Click ‘Source Editor’ button. This displays a window to which code can be inserted
- Add the code to this page (The code is the one referred to in ‘Workplace Monthly’ article
- Click ‘Save’
Find the Web Part ID
(3) The last step in the process is the find the Web Part ID of the list and linking to the ‘Print’ button. As it is well explained in the source article, kindly refer to Workplace Monthly article. This displays a neat ‘Print’ button in the web part. As the web part Id is passed as a parameter, one can have any number of ‘Print’ buttons or links, each referencing a different list. Quite handy!
Refer this blog forĀ a collection of free webparts.
Copyright 2008 referpages
Related posts:
Looks like the workspace monthly article has been moved and we get ‘page not found’ error.
Endusersharepoint.com is also a good source for printing sharepoint webparts
Also refer to Using JQuery to Print a Webpart