Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

How to get the Version History of Share point List items in Reports

  Asked By: Angelique    Date: Feb 18    Category: Sharepoint    Views: 6357

I have version history available for the List items in my SharePoint Application (VS 2005,WSS 3.0, MS SQL 2005).I want to show the version history in SSRS reports.

I am thinking to Find the Stored Procedure which generates the Version History for List Items , And planning to use that stored procedure in my SSRS Reports.My Question is "which stored procedure is generating the Version History for the list item ?"

Click here for screen shots.

PIC 1 :It shows the the List Item and see there is Version History at the bottom,which takes to Version history of that item (PIC 2).

PIC 3 :When i filter the WSSContent Database Stored Procedures, i found a bounch of them , there is a Table Dig where this verison history stores.

Let me know about the possible options to get it done .



1 Answer Found

Answer #1    Answered By: Ada Sosa     Answered On: Feb 18

Some explanation :
· Main idea—Using Time Job to synchronize data from SPlistItem-Version instance to a new SQL table, then consume the data in SSRS Report.
· About version  object, you can retrieve SPListItemVersion like this following:

SPList list  = pWeb.Lists["ListName"];
foreach(SPListItem item in list.Items)
foreach(SPListItemVersion ver in item.Versions)
//Version Label
string v_lable=ver.VersionLabel;
//Version Url
string v_url =ver.Url;


· About time-Job, please see the following:
Timer Job(http://msdn.microsoft.com/en-us/library/bb862072.aspx)
Creating Custom Timer Jobs in Windows sharepoint  Services 3.0(http://msdn.microsoft.com/en-us/library/cc406686.aspx)
Creating Custom SharePoint Timer Jobs (http://www.andrewconnell.com/blog/articles/CreatingCustomSharePointTimerJobs.aspx)