Share via


Name columns missing information on reports library after migration from SharePoint 2007 to SharePoint 2010

 

Issue

If we are upgrading from from MOSS 2007 to SP 2010 and you have lot of reports library in 2007. After migration you might see  File names are missing in the Current reports view of all our Reports Libraries (/ReportsLibrary/Forms/current.aspx) in SP 2010.

In the library settings for the Reports Library, the Name column is associated with Name (link to report with edit menu). The same association used to works fine in MOSS 2007, but not in SP 2010.

Cause:

If we compare the 2007 reports library and 2010 reports library we see that for reports content type in 2007 we used “ReportLinkFilename” for the Name field which is not present in SharePoint 2010.

As this information or reference is not present in 2010 we will observer this behaviour on all migrated reports library content.

Fix:

As of now we don`t have way to get “ReportLinkFilename” reference in SharePoint 2010. However what we can do it instead of using “ReportLinkFilename” we can use “LinkFilename” for the Name column and update all the current reports view.

Here is a sample powershell script which will scan all your webs in site collection and look for reports library and update this information.

I would recommend to take a working back of site collection before using the script.

If you want to confirm that behaviour on one of reports library..you can try these steps to check

Edit the “Current reports “ view and uncheck the Name column( link to report with edit menu) and check the Column Name(linked to document with edit menu) and check the behaviour.. if this is something what you are looking for.. you can use the script below.

$site= Get-SPsite https://moss2010-1

foreach ( $web in $site.allwebs )
{
    $lists = @{}
    $count = 0
    foreach($list in $web.lists)
    {
        If ($list.TemplateFeatureId -eq "2510d73f-7109-4ccc-8a1c-314894deeb3a")  #this is report library GUID
        {
            $lists.add($count++, $list.ID)            }
    }
   
    foreach ( $value in $lists.Values )
    {
        $list = $web.lists.GetList( $value, $false )
        $view = $list.Views['Current reports']  # getting the current view in variable
        write-host $list.Title
        try
        {
            $view.ViewFields.delete('ReportLinkFilename')      # we are using try block as we are not sure about the OOB lists if they have this link
        }
        catch
        {
            Write-host "Field not found"  # if it does not have it will fail and print this error message
continue

        }
        write-host "Executing updates..."  # this is where when we come out of try loop and execute the remaining stuff
        $view.ViewFields.Add('LinkFilename')
        $view.ViewFields.MoveFieldTo('LinkFilename',1)
        $view.Update()
    }
 
}

Save the all this is information in a notepad and save as reportviewfix.ps1 and run it from SharePoint PowerShell

Comments

  • Anonymous
    July 11, 2013
    I was able to fix this by deleting and re-adding the report web part.