Category Archives: SQL Reporting Services

SharePoint Multiple Select Parameter Dropdown with SQL Server Reporting Services

When leveraging a SharePoint List as an SSRS data source, one major problem is formatting of list items as they appear in reports.  This is fairly easy to solve in code. Another issue is leveraging Multiple Lines of Text columns as Report parameters.  This is actually fairly tricky and has limitations.

In order to leverage a Multiple Lines of Text column as a Report parameter, the first thing to keep in mind is that an Embedded Data Set is a requirement.  A Shared Data Set cannot be used with this solution.

First, add the following code to the Report.  As more values are added to the Multiple Lines of Text (e.g. more choices), this code will need to be manually adjusted.  Replace “MyField” with the internal field name.  The below example is valid for 4 choices in the Report parameter.

Next, you’ll need to modify your Data Set Expression, removing a portion of the CAML query until it looks similar to the following:

This example should help you get started to using Multiple Lines of Text as a value for Report parameters.  This will allow you to leverage this field type in as a Multiple Select Report Parameter.

SQL Server Reporting Services ignores Alternate Access Mappings When Checking for Report Subscriptions

For SQL Server Reporting Services 2008 R2 and 2012 in SharePoint Integrated Mode, SSRS is leveraging the exact URL the client is using in order to evaluate if a Report Subscription is present.  For example, I have a single Web Application with two AAMs: http://webapp1 and https://webapp1.nauplius.local.  Fairly common scenario.  This user (me) created a blank report and a dummy subscription on the report named Test1.  You can see the Subscription is present in the Manage Subscriptions list:

Cap1[3]

However, we switch to the other AAM, and what do we see on the exact same report?

Cap2[3]

No subscription!
In the Microsoft.ReportServices.SharePoint.UI.ManageSubscriptionPages method, Microsoft is creating the value for m_reportUrl using the current context of the URL the user is using and passing that to the SubscriptionListControl:

We go through a few other methods, but get down to Microsoft.ReportingServices.SharePoint.SharedServices.Client.ReportingWebServiceClient.ListSubscriptions:

We’re still passing down that m_reportUrl value from the page to this function, which finally passes it to:

And because that “this.m_siteUrl” is the same value as m_reportUrl, if you are on a different Alternate Access Mapping than the Subscription was created on, we get no subscriptions.

 

Reporting Services 2012: “Some sites are not completely upgraded”

If you’ve installed Reporting Services 2012 on SharePoint, you’ve probably noticed that the databases, like the below, are marked that some sites have not been completely upgraded:

Database Type Status
ReportServer_Alerting ReportingServiceAlertingDatabase Database is up to date, but some sites are not completely upgraded.
ReportServerTempDB ReportingServiceTempDatabase Database is up to date, but some sites are not completely upgraded.

Of course, neither database contains “sites”, so there is nothing to upgrade.  If we look at the database properties using:

Returns true. If we look at the code, we enter the function:


This function goes off onto a bunch of other functions, including functions that indicate that the ReportingServiceAlertingDatabase and ReportingServiceTempDatabase cannot be upgraded (or CanUpgrade is false).  We end up hitting this chunk of code:

In the end, the value of flag is indeed false and we hit the two Log.Debug statements, which produce:

And, because the statement returns true back to the original NeedsUpgradeIncludeChildren function, well, we get the Central Administration warning about some sites requiring an upgrade.  This is of course something to ignore.