Problem with opening Report Data Source

Activating the reporting features

By default, when the SSRS 2016 is installed, the root site collection has the features turned on. For the rest of site collections, you will have to activate it manually. To activate reporting features:

  1. Go to Site Settings page of the site collection
  2. Click Site collection features under Site Collection Administration
  3. Click Activate against Report Server Integration Feature
  4. Go to Site Settings page of the site you want to create reports in
  5. Click Manage site features under Site Actions
  6. Click Activate against Report Server File Sync

By activating the features, two reporting content types are added to the site collection: Report Builder Report and Report Data Source.

Note: Report Model is deprecated and you cannot create Report Model from SSRS 2016, but you can continue to use the existing report models as a source.

Problem with Report Data Source

After I installed and configured SSRS 2016 in the SharePoint 2016 environment, I can now check if my existing reports are still working or not. (We have been using SSRS reports a lot in SharePoint 2013 already.)

I tried to create a new site collection and created data source and reports there. Everything seems to be working perfectly. However, when I tried to open an existing report, it’s complaining about the data source.

As I click on the report data source, I couldn’t edit it but received the following error:

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

There wasn’t much of help on the web to my specific problem, however, there are some solutions:

1. There are some invalid page layouts deployed to the master page of your report.

Please delete them using UI, you can refer to this thread: Index was out of range. Must be non-negative and less than the size of the collection.

2. There are images in the page header or page footer, but the footer or header is not large enough to handle the image inside it.

Change the height of the page header or page footer. Please refer to Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index.

3. Please try to change the parameter Toggle’s data type from Integer to Boolean and set the available values are:
Expand All—-true
Collapse All—-false

Investigating the master pages

In my case, it’s to do with opening the Report Data Source file, not actual reports. So any solutions refer to changing a report itself are not applicable. The only thing I could think of was the custom master page.

After a couple of testing, I found out that my custom master page was only affecting the Report Data Source files when it’s set as System Master Page. That is if I changed the System Master Page back to seattle (the default one), the report files would work. If you can live with this, then problem solved. If not, we need to find the differences between the default and custom master pages.


There are a number of online code compare tools out there, and the one I used was Code Difference Comparison Tool. It compares the codes side by side and highlights the differences. That’s all we need. The quickest way to locate the ‘show-stopper’ is to repeat the following steps for the bits that are different to the default:

  1. Remove the difference or change the code the same as the section in Seattle
  2. Test the Report Data Source file see if it opens
  3. If error persists, revert the code back to what it was, and repeat the steps for the next difference

The bit of code I found was in the breadcrumb placeholder:

Seattle master page

Custom master page

After updating the custom master page to the same as the Seattle master page, I can open all of the Report Data Source files.



Resolve – Databases running in compatibility range, upgrade recommended.

I noticed this warning on top of my Central Administration page after the migration from SharePoint 2013 to 2016.

The SharePoint Health Analyzer has detected some critical issues that require your attention. View these issues.

One of the Configuration warnings is Databases running in compatibility range, upgrade recommended.

To clear this warning, follow the steps below:

  1. Open SharePoint 2016 Management Shell from the SharePoint server
  2. Use this cmdlet to upgrade content databases
    Get-SPContentDatabase | Upgrade-SPContentDatabase
  3. Use this cmdlet to upgrade the other databases such as Search
    PSConfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures
  4. Once the upgrades are done, click Reanalyze Now against the issue.

Troubleshoot – install SSRS 2016 Integrated Mode with SharePoint 2016

This week, I’ve been assigned a task/challenge to try and install and configure the SSRS 2016 for our new SharePoint 2016 environment. We are migrating from SharePoint 2013 to SharePoint 2016, and upgrading the SSRS becomes part of the migration.

The installation process is pretty simple and straightforward IF you didn’t have these many issues like what I have experienced.

Convert SharePoint server to Custom Role
Install the SSRS
Troubleshoot – Error 1603
– Fix exception – missing feature
– Fix exception – database schema
Continue reading

Aligning image and text in a table row

I have been sharing a trick with my SharePoint content administrators on aligning images and text. That is to use a table and put image and text on its own cell in a row. And we normally want to have the text aligned at about the centre of the image so it looks nice. That’s what we call a ‘vertical-align to the centre’.

Back in the SharePoint 2010 sites, we use the HTML tag <td valign=”middle”>. You can change to top or bottom for different vertical alignments. However, in SharePoint Online, or let’s say in SharePoint 2013 built, it’s no longer supported.

After a little search on, I found out the tag is no longer supported in HTML5. Luckily, there is still a way. That is to use CSS syntax: <td style=”vertical-align:bottom”>.


What’s missing in the new experience (for document libraries)

I recently turned on the new experience for all my sites and wanted to do a comparison between the new and classic mode. While the new experience is the way moving forward, there are a lot of things that we used to have in classic mode are not yet been made available in the new experience.

Here I found a comprehensive list on the Microsoft website: Differences between the new document library experience and classic mode

Features available only in classic mode

The Ribbon

  • The Ribbon itself
  • Certain features available through the Ribbon:
    • Popularity trends
    • Tags & Notes
    • Quick Edit
    • RSS Feed
    • Most Popular Items
    • Connect to Outlook
    • Connect to Office
    • Export to Excel
    • Form Web Parts
    • Edit Library
    • New Quick Step
    • Declare Record
    • Send To
    • Follow

View features

  • Item totals
  • Custom styles (such as Basic Table or Document Details)

Navigation features

  • Tree view
  • Metadata navigation and filtering
  • Managed navigation
  • Per-location views
  • Customized navigation links on publishing sites

Library features

  • External data columns
  • Geolocation columns
  • Content organizer
  • Follow feature
  • View in File Explorer (opens library in classic view, but switches back to the new experience the next time you browse to the library).


  • Minimal Download Strategy (MDS)
  • SharePoint Server Publishing
  • JSLink code on fields or views
  • CustomActions that include ScriptBlock or ScriptSrc properties
    CustomActions that do not include ScriptBlock or ScriptSrc properties will continue to work as expected

Content viewing report showing no data

I wanted to use the content viewing report in one of our SharePoint Online sites to track the views. However, when I clicked Content viewing on the View Auditing Reports page, it gave me an error – report contains no data. My first reaction was going to the audit log settings page to make sure the settings are correct. Noticed the Opening or downloading documents, viewing items in lists, or viewing item properties option is not available in Documents and Items section.


I found out this type of report is not available for SharePoint Online.  One of Microsoft’s article pointed out that “In SharePoint Online, this report will be blank as these events are not captured during auditing.”

Why? A potential reason is, from another Microsoft’s article, “For SharePoint Server 2013, we recommend that you only select the Opening or downloading documents, viewing items in lists, or viewing item properties event when absolutely necessary. This option is likely to generate a large number of events that will potentially degrade the performance and other aspects of your site collection(s).”


Create a custom web part to display news

I had no idea how those news-like web parts were created until recently when I decided to try it out. I didn’t invent this myself, of course, thanks to Google, and lots of  SharePoint gurus who care to share. Also, I have to say, this is a really plain and simple web part I managed to create. After all, I am only a beginner in this journey. OK, let’s get started.

Add a custom field to a Content Query Web Part

In a standard CQWP, the fields available are Link, Image, Title and Description. I wanted to add the Article Date so it’s more like a News summary web part. This is done through modifying the XSL style sheet, the file name is ItemStyle. Instead of change the default one, I’m going to create a custom XSL file.

  1. Site contents > Style Library > XSL Style Sheets
  2. Download the ItemStyle file, save as ‘CustomItemStyle’ and use an Editor to open the file.
  3. Copy the lines of the Default Style and copy it right after the lines.
  4. Edit the new style name by replacing the first line with
    Note: This will be the Item style name your users can select.
  5. Go to the bottom of this style, just above < div class=”description”>, insert
    < div class="article-date">
      < xsl:value-of select="ddwrt:FormatDate(@DisplayDate, 2057, 3)"/>
    < /div>

    1. DisplayDate will be the field name for displaying the article date of an item.
    2. By default, the date will be formatted to YYYY-MM-DD hh:mm:ss. The format bit I added in makes the dates look like this 23 June 2016.
    3. For this FormatDate function to work, you will need this line at the beginning of the file.
    4. Remove the space after < in each line for the code to work

  6. Save the XSL file and upload it to the XSL Style Sheets library.
  7. Check in and publish as a major version

Create a custom Content Query Web Part

Now, we need to point the Content Query Web Part to the custom style file we just created.

  1. On a page, add a Content Query Web Part
  2. Edit the Web Part properties and change anything that you wanted to include it into the custom web part. For example, I change the Web Part title to be News.
  3. Click the down arrow and click Export
  4. Edit the exported file in a text editor
  5. Edit the node with the name “ItemXslLink” to be /sites/[sitecollection]/Style%20Library/XSL%20Style Sheets/CustomItemStyle.xsl
  6. Save the file.

Upload the custom web part

The last thing we do here is to upload the web part file into the site collection.

  1. Site Settings, Click Web parts under Web Designer Galleries
  2. From the Files tab, select upload
  3. Rename the web part if you want to, and select/create a Web Part group for it.

Add the custom web part to a page

You will find the web part in the group you selected in the previous step. As you edit the properties of the web part, note the style “WithArticleDate” is available with an additional line for DisplayDate.

Here is my end product

Thanks to the authors of the following articles:

Displaying Custom Fields in a SharePoint 2013 Content Query Web Part

Custom Date Formats in SharePoint XSL

Customizing the Content Query Web Part and Custom Item Styles