SPElements Logo

Printing SharePoint Calendars & Lists

Most of the ideas to build WebPart come from client requests. Few days ago a client asked how can he print his SharePoint calendar?

Well, there are some full size calendar web parts for SharePoint, which include printing, however that wasn’t the request. He just wanted to print his current calendar.

Making long story short – no existing solution was found, thus came SPPrint, a printing feature for SharePoint, to print SharePoint calendars. As a side effect it can also print any given list (an idea taken from Ishai’s printing feature)

Update: Please leave comments in the community forum. There are too many comments to follow properly here.

28 Responses to “Printing SharePoint Calendars & Lists”

  1. Great tool..

    I always had the problem of printing sharepoint lists: like expenses list, sales list, etc…, but SPPrint have solved some of that..!!

    Actually, I need also to print filtered data of the list, like: entries of certain type of expense, or entries added by a certain user, etc…

    I don’t want to create a view for every filter in order to print the filtered list..

    Could you help in that??

    Thanks

  2. Svetlana says:

    I would like to test SPPrint tool, how do I install it? Thank you.

  3. admin says:

    @Ahmed – I’ll add your request to my todo list, but I’m not sure when I’ll do that. Basically, you want to add a custom filter before the printing it self, which is possible but will take some work.

  4. admin says:

    @Svetlana – SPPrint is installed like any other SharePoint WebPart/Feature – it has a WSP file which should be installed on the SharePoint machine using administrator privileges. There’s a file called ‘README.txt’ in the SPPrint zip file which explains all the options how to install SPPrint. Most people prefer to use their own installation methods, using the WSP file in the SPPrint zip file, but you can also use the batch file or the installer that I’ve placed in that file (just read the readme file first).

    You can download the SPPrint zip file from here.
    I would recommend installing it first on a test machine to verify that it fit your need.

  5. Roopesh says:

    I am having problem in printing the calendar with this download on WSS 3.0 Rest are all ok. It is througing “Unknown error”. has any one got this error. It is having on prod box not on development machine

  6. admin says:

    Is that all what you see? can you send the full error message?
    Any detail can help here: Anything special about that calendar? do you use calendar default view? do you use any special add-ins for that calendar?

  7. Roopesh says:

    Nothing special about the calendar. I can try with another site where there is calendar and let you know . It tries to access the SpPrint.aspx page passing in the List Id and rest and then throws unknown error on that page. Strange the Dev machine works , it does opens up the asp x page with the calendar. Note Dev machine is MOSS 2007 . Prod has not yet migrated to moss yet. Anything I am missing ? Or can we diagnose the unknown error.

  8. Roopesh says:

    This what I get doesn’t matter which calendar view I choose

    http://sharepoint.ts.samhsa.gov/_layouts/SpPrint.Print.aspx?ListId={7CD76439-2AF5-42F6-B701-120F7485AF8C}&ViewId={5E81863D-F4E6-4B59-88C5-8A31478DB0B0}&PageName=calendar.aspx&PrintType=Default

    Go back to site
    Error

    Unknown Error
    Troubleshoot issues with Windows SharePoint Services.

    Note: Other lists do work . They are printing.

  9. Roopesh says:

    This is call stack error information:

    Value cannot be null.
    Parameter name: g at System.Guid..ctor(String g)
    at Microsoft.GroupBoard.WebControls.CalendarViewControlTraverser.GetListFromCalendarControl()
    at Microsoft.GroupBoard.WebControls.CalendarViewControlTraverser.get_IsSRList()
    at Microsoft.GroupBoard.WebControls.GbwListDeterminer.OnInit(EventArgs e)
    at System.Web.UI.Control.InitRecursive(Control namingContainer)
    at System.Web.UI.Control.InitRecursive(Control namingContainer)
    at System.Web.UI.Control.AddedControl(Control control, Int32 index)
    at System.Web.UI.ControlCollection.Add(Control child)
    at Microsoft.SharePoint.WebControls.SPCalendarView.CreateChildControls()
    at System.Web.UI.Control.EnsureChildControls()
    at System.Web.UI.Control.PreRenderRecursiveInternal()
    at System.Web.UI.Control.PreRenderRecursiveInternal()
    at System.Web.UI.Control.PreRenderRecursiveInternal()
    at System.Web.UI.Control.PreRenderRecursiveInternal()
    at System.Web.UI.Control.PreRenderRecursiveInternal()
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

  10. admin says:

    Thank you for the detailed response. The issue was compatibility with the GroupBoard Workspace/Template. I think I’ve solved it now – try SPPrint 1.1

  11. Roopesh says:

    Thanks for the reply and we did it to repair and it works without any issues/errors. So what was the change in source code so that we know and make the same thing for other controls using GroupBoard Workspace/Template. Is it the same source just configurations and installation settings?. Let us know so that that we download the source.

  12. admin says:

    Changed the code (exactly one line), after creating the instance of _calendarView set the list name -
    _calendarView.ListName = listId.ToString();

  13. Roopesh says:

    We are all set . Thanks. Only thing that is left with this printlist we have to see how we can make the option of Shrink to fit to a page (width and height change) as it goes to page 2 instead of all in one page to print when the customers print . I don’t know if we can do it from code level any or they have to do a page set change and if they can fit to a page. It must be some page layout stuff.

  14. jriesen says:

    A couple of things not working as I was expecting. First, there seems to be a blank first page. Is there a way to not have the blank first page? Second, when I change the view for my sharepoint calendar the Print feature does not work. I just get a blank page. Is there something I need to change to get the Print feature to work for views?

  15. admin says:

    A. If by ‘a blank first page’ you are referring to the printing result – check the printer settings (use fit to page)
    B. Changing the view – SPPrint tries to print the exact view you’re using. By default it prints ‘table’ view, however, for calendar default view there’s a special treatment which allows the calendar to be printed as displayed on screen. What other views do you have of the calendar which are not printed correctly?

  16. Vascop says:

    Hi, today a try your tool and is great but one idea i have or i realy need is to print not all the list but only line /item/ from the list and print it in form like OrderSKorMultilang or InvoiceSKorMultilang with only chosen rows. This options could be in menu where is Print option.
    Any idea how to do it? or help
    Iam not a programer.

  17. admin says:

    If you want to print only part of the rows of a list, create a view where only those rows are visible. Since SPPrint prints the current view it will print only the visible rows in the new view (once you click ‘print’ in the new view).

  18. Vascop says:

    but i need only one line for imagination two oreders
    7001 company goods 100Eur VAT 10 Sum 110 Profit 10 print this in invoice form only
    7002 company1 service 50Eur VAT 5 Sum 55 Profit 5

  19. admin says:

    I’m sorry. I can’t help you with this at this time.

  20. Vascop says:

    ok if you find any solutions to help please contact me many thanks

    bew@bew.sk

  21. chiqnlips says:

    great web part! no problems getting it to work with the calendar but how do i get it to work with a regular ol’ list? by that i mean how do i get the print option to appear in the actions drop down for a list?

  22. chiqnlips says:

    most lists have that option in the actions menu…maybe the print option doesn’t appear because it’s an xslt view?

  23. admin says:

    I believe that the drop down list for a list is for item actions, not for list actions.

  24. Firoz Pathan says:

    Same problem as one mentioned earlier by “jriesen” about the blank page. I have only one calendar view (i.e. default view) that I can print. None of the other calendar view print i.e. it shows the blank page. Other views are very similar with slight different filters. Any ideas? suggestions?

  25. jbryant says:

    As Firoz mentioned, only the calendar on first page prints. Any other calendar or sub sites are not printing.
    As well, is there any way to print the background colour? I have enabled colour coding and when I print the first page, it drops the coding.

  26. admin says:

    A. I’ve failed to reproduce the problem you all describe. Can you write a step-by-step list how to reproduce this problem?
    B. Color coding will not hold in the printing since it’s not built-in to the calendar
    C. Please reply in the forum, not here. It’s hard to track problems here.

  27. Sgodman says:

    1st is there a way to get the source for this so that I can modify?
    2nd there is a minor bug in the day view for the calendar. if you click on any day in the calendar it brings up the day view, you cannot print that view unless you click on the word day at the top of the screen. This is due to the marvels of js being case sensitive. The url wil end with this… CalendarPeriod=Day, this feature is looking for a lower case CalendarPeriod=day, which is what you get when you click the Day view link.

  28. admin says:

    1. This feature is not open source at the moment. What changes you want?
    2. Issue fixed. You can download the fixed SPPrint v1.2 from the web site.

Leave a Reply


SP Elements Blog is proudly powered by WordPress
Entries (RSS) and Comments (RSS).

© 2010 SPElements