Posts

Report Builder Connectivity Issues

Issue: Previewing a Report Builder report connected to Analysis Services works in Report Designer but it fails in Report Builder 3.0 with the following error:

An existing connection was forcibly closed by the remote host

—————————-

Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.

—————————-

Further, SQL Profiler reveals that an Anonymous connection is attempted to Analysis Services even though you use an embedded report data source (using a shared data source on the server will run the report on the server while with an embedded data source results the report runs on the client).

Resolution: Check if Report Builder is connected to a report server running in SharePoint mode by examining the status bar. If it is, click the Disconnect link. Report preview should now work.

3465.rb.png-550x0

Hiding SQL Server 2012 Reporting Services Extensions in SharePoint

To continue my Report Server Settings in SQL Server 2012 SharePoint Integration Mode blog, here is another example of how to use the new PowerShell-based configuration mechanism to hide a rendering extension. In this case, the script finds an SSRS application called SQL Server SSRS (replace with the name of your SSRS application from SharePoint Central Admin) and hides the XML renderer so the XML export option doesn’t appear in the Actions drop-down.

$apps = Get-SPRSServiceApplication  | where {$_.name -like “SQL Server SSRS”}

Set-SPRSExtension -identity $apps -ExtensionType “Render” -name “XML” -ExtensionAttributes “<Visible>False</Visible>”

Can’t Activate Reporting Services Service in SharePoint

I upgraded SQL Server 2012 from RC0 to RTM today on a SharePoint application server which was configured for Reporting Services integration. The upgrade went with no errors but I got this error when requesting reports:

  • The requested service, ‘http://amatltapp02:32843/1dacf49a2f7a4a6daa8db5768539893f/ReportingWebService.svc’ could not be activated. See the server’s diagnostic trace logs for more information.
    • The requested service, ‘http://amatltapp02:32843/1dacf49a2f7a4a6daa8db5768539893f/ReportingWebService.svc’ could not be activated. See the server’s diagnostic trace logs for more information.

    And, when browsing directly the service:

    After some digging out, we solved the issue by changing the Enable 32-Bit Applications property of the IIS application pool for the SharePoint web application to False.

    031512_1512_CantActivat1

Server Error in ‘/1dacf49a2f7a4a6daa8db5768539893f’ Application.


The farm is unavailable.

Finding Reporting Services Service in SharePoint

SharePoint is a like an ocean – the further you go, the deeper it gets

Ancient proverb 

Scenario: Configure SQL Server 2012 Reporting Services on a multi-server SharePoint farm with the following topology:

WEB1 – Web front-end Server 1

WEB2 – Web front-end Server 2

APP1 – Application server 1 that hosts the Central Administration site

APP2 – Needs SSRS 2012

APP2 – Needs SSRS 2012

Issue: I couldn’t find the SQL Server Reporting Services Service Application option when I expanded the New button in Central Administration ð Manage Service Applications

Resolution: Although the SQL Server 2012 Reporting Services service and Reporting Services Add-in were installed on APP2 and APP3, the SQL Server Reporting Services service wasn’t registered at a farm level. As a result, I couldn’t find the SQL Server Reporting Services Service in Central Admin -> Manage Services on Server on none of the application servers. As it turned out, the SSRS service must be also registered on the application server hosting Central Administration (APP1 in my case) as Prash Shirolkar explains in his blog:

  1. Remote in to APP1.
  2. Install the Reporting Services add-in to get the SSRS PowerShell cmdlets. In my case, I installed only the add-in and not the Reporting Services service since I didn’t want it on APP1.
  3. Run the SharePoint 2010 PowerShell as admin and execute the three commands in the Install and Start the Reporting Services SharePoint Service in the Install Reporting Services SharePoint Mode as a Single Server Farm document:
    1. Install-SPRSService
    2. Install-SPRSServiceProxy
    3. get-spserviceinstance -all |where {$_.TypeName -like “SQL Server Reporting*”} | Start-SPServiceInstance

Interestingly, the first two commands don’t echo any output. The third command, however, should show you a message that the SSRS service has been provisioned. Now, you can go to Central Administration ð Manage Services on Server and you should be able to find the SQL Server Reporting Services Service. More importantly, you should be able to go to Central Administration ð Manage Service Applications, expand the New button and then click SQL Server Reporting Services Service Application to finalize the Reporting Services setup.

Possible alternative resolution path

Although I haven’t tried it because the client woudn’t allow farm configuration changes, another potential resolution path could be to temporarily switch the application server that hosts the Central Administration utility to one of the SSRS application server (APP2 or APP3) as explained in the blog post, “How to change Central Admin Host in SharePoint 2010” by Kirk Barrett. Then, you can register the SSSRS service on that server by executing the steps in item 3 above. Finally, switch back the Central Administration host server to the original server (APP1).

Subscription and Alerts Issues with Analysis Services in SQL Server 2012

As you probably now, Reporting Services doesn’t allow you to create subscriptions with data sources that use Windows security because subsbscriptions are run in unattended mode. Moving to SQL Server 2012, we’ll add Data Alerts to the list. This presents an issue if you use Analysis Services which only supports Windows security. The only option is to use Stored Credentials with the “Use as Windows credentials” checkbox checked. You won’t able to pass the user identity by checking “Set execution context to this account”. As with previous releases, “Set execution context to this account” works with the SQL Server data but it doesn’t work with the Analysis Services provider.

I raised this issue to Microsoft and I posted a bug report. The issue is under investigation but it’s unlikely to get fixed before SQL Server 2012 ships. Please vote!

What’s New in Power View RC0

I was just about to write a blog about the new features in the Release Candidate (RC) build of Power View and I saw that Robert had written a great blog already. It’s great to see the product coming along so nicely. Can’t wait to be able to use multidimensional cubes as data sources!

One feature that stirred a lot of excitement and deserves more attention is Power View export to PowerPoint. When you export a report to PowerPoint, initially you get static slides that show images of the report pages.

112311_0129_WhatsNewinP1

Don’t be fool however as you can click the Click to Interact button to render the report live. The interactive mode preserves all report interactive features. For example, in the screenshot below I am playing the scatter chart animation.

112311_0129_WhatsNewinP2

Behind the scenes, the interactive mode uses a Silverlight alternative hosting control (right-click the object on the slice and click View Code) that points to the deployed report on the SharePoint server. Therefore, a live connection and permissions to SharePoint are required to preview the report inside PowerPoint.

112311_0129_WhatsNewinP3

UPDATE 11/29/11

As explained in the SQL Server 2012 RC0 release notes, the pre-release bits of Silverlight 5 are not available in 64-bit. The RTM release will include a 64-bit installer and it looks like it be available pretty soon. Meanwhile, trying to interact with a Power View report exported to PowerPoint 64-bit wil fail with the error “Some controls on this presentation can’t be activated. They might not be registered on this computer.”

 

Report Server Settings in SQL Server 2012 SharePoint Integration Mode

111611_0119_ReportServe1Well, rules have changed. As Jaime Tarquino from the SSRS team explained in his blog, “SQL Server 2012 Reporting Services SharePoint Integrated Mode”, there is no rsreportserver.config file anymore moving to Reporting Services 2012 in SharePoint integration mode (there are no configuration changes with native mode). Instead, the configurations sections are now saved in the SharePoint configuration database.

Problem: A customer plans to upgrade to SQL Server 2012 and SharePoint integration mode. They had the following custom renderer registered in the rsreportserver.config file that uses device information settings to customize the Excel renderer to suppress report headers and use Excel headers instead:

<Extension Name=EXCELNOHEADER Type=Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer,Microsoft.ReportingServices.ExcelRendering>

    <OverrideNames>

        <Name Language=en-US>Excel (no Header)</Name>

    </OverrideNames>

    <Configuration>

        <DeviceInfo>

            <SimplePageHeaders>true</SimplePageHeaders>

            <RemoveSpace>0.012in</RemoveSpace>

        </DeviceInfo>

    </Configuration>

</Extension>

The customer claimed that this configuration is so important that there is no way they could upgrade if this doesn’t work in SQL Server 2012. And after ensuring them that this is an easy fix, I’ve found myself spending hours to understand what needs to be done. On the positive side, I’ve picked up a few PowerShell skills along the way which may come handy given that PowerShell is omni-present nowadays.

Solution: In SQL Server 2012 (SharePoint integrated mode), you need to make such changes with PowerShell. The PowerShell Cmdlets topic in BOL is a good writeup about the SSRS cmdlets. The following script gets the job done:

Add-PSSnapin Microsoft.SharePoint.PowerShell

$apps = Get-SPRSServiceApplication

foreach ($app in $apps)

{

New-SPRSExtension -identity $app -ExtensionType “Render” -name “EXCELNOHEADER” -TypeName “Microsoft.ReportingServices.Rendering.ExcelOpenXmlRenderer.ExcelOpenXmlRenderer,Microsoft.ReportingServices.ExcelRendering” -ServerDirectives “<OverrideNames><Name Language=’en-US’>Excel (no Header)</Name></OverrideNames>” -ExtensionConfiguration “<DeviceInfo><SimplePageHeaders>true</SimplePageHeaders><RemoveSpace>0.012in</RemoveSpace></DeviceInfo>”

}

The script starts by importing the Microsoft.SharePoint.PowerShell snapi (you don’t need it if you run the remainder of the script in the SharePoint 2010 Management Shell). Then, the Get-SPRSServiceApplication cmdlet returns all the Reporting Services Service Applications available in the farm. For each application, I call the New-SPRSExtension to register the new renderer. To run the script:

  1. Remote to the SharePoint server. You must have SharePoint Farm Administrator rights to run the script.
  2. Open SharePoint 2010 Management Shell from the Microsoft SharePoint 2010 Products program group. Or, if you have installed the Windows PowerShell ISE feature, you can open Windows PowerShell ISE from the Accessories program group but make it sure to run it as administrator (right-click on it and click Run As Administrator).
  3. Copy and paste the script, and hit Enter to run it. The figure below shows the script in Windows PowerShell ISE:
  4. Do iisreset to apply the configuration changes.

For a full list of the New-SPRSExtension cmdlet parameters, you can execute the following command

Get-help New-SPRSExtension – full 

To verify that the changes are applied you could use one of the following two approaches:

  1. Execute the following script to output the configuration of all extensions:
    $apps = Get-SPRSServiceApplication

foreach ($app in $apps) {

    $extensions = Get-SPRSExtension -identity $app

    foreach ($extension in $extensions) {

echo $extension.ExtensionType $extension.Name

echo $extension | select -ExpandProperty ConfigurationXml }

2. In SSMS, connect to the SharePoint config database and run the following query. Examine the content of the Properties column to make sure that the custom extension is registered.

SELECT * FROM [dbo].[Objects] WHERE properties like ‘%excelnoheader%’     

I was tempted to try modifying directly the Properties column in the Objects table and add the new extension section but I realized I had better use of my time than troubleshooting failed SharePoint installations so I decided to stick with the supported way.

Special thanks to Prash Shirolkar from the Reporting Services team for shedding light in dark places. His blog has valuable insights about Reporting Services and SharePoint.

MDXParameter Sample

MDXParameter is a nice little utility that captures MDX queries sent from SSRS reports and replaces parameter placeholders with the actual values. I’ve been using the excellent Darren Gosbell’s Query Capture sample which is one of the first utilities I install when starting a new project. MDXParameter has a few more features that you might find appealing, including saving the queries in a database and showing the parameters separately. Installing MDXParameter is simple:

  1. Download MDXParameter from Codeplex and unzip it.
  2. MDX Parameter requires a SQL Server database to capture the queries. It could have been nice to include an option to write the queries to a file or just the screen but currently you must create an empty SQL Server database. You can name the database anything you want.
  3. Double-click MDXParameter.exe to start it. You will be prompted to specify the connection details. Note that MDXParameter will automatically create the table schema.

111111_1320_MDXParamete1

  1. Click OK to launch the main interface and click Start to start the trace.
  2. Go to your SSRS report and run it. Make sure to delete the *rdl.data file in the SSRS project folder to avoid running the report with cached datasets.
  3. Click Stop to stop the trace. You should see the all report MDX queries captured. Select a query to see its statement in the MDX tab. If the query has parameters, MDXParameter will replace them with the actual values (if the Replace Parameter checkbox is selected). This of course is the main reason why you need MDXParameter as it saves you a great deal of time if you want to execute the query with many parameters in SSMS. The tabParametersGrid shows you a grid with the actual parameter values. The Execute MDX button is currently not functioning.

111111_1320_MDXParamete2

MDXParameter supports SSAS 2005, 2008, and R2.

Stopping SSRS Parameter Refresh

[View:https://prologika.com/CS/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/blog/5736.Product-Sales.rdl:550:0]

Problem: How do we stop the maddening parameter refresh for reports that use SSAS cubes? As you’ve probably found, nothing seems to stop it and the Never Refresh option on the Advanced parameter properties is useless.

Solution: Use the OLE DB provider for Analysis Services for the parameter queries, as shown in the attached report.

Reporting Services Data Alerts

SQL Server 2012 introduces a Reporting Services feature called Data Alerts. Data alerts notify a selected list of recipients about data changes on the report. Behind the scenes, data alerts use the report data feeds feature which was introduced in SQL Server 2008 R2. Consequently, similar to subscriptions, data alerts run in the background and poll the reports for changes. For more information about the data alerts architecture, read the Data Alerts (SSRS) topic in BOL.

The steps to create a data alert for the Company Sales 2008 report follow (note that creating alerts require View Items and Create Alerts SharePoint permissions):

  1. Open the report in SharePoint.
  2. Expand the Actions menu and click New Data Alert.

    103011_0010_ReportingSe1

    Reporting Services opens the New Data Alert dialog box. The Report Data Name drop-down list shows all data regions defined on the report. In the case of the Company Sales report, there is only one data region – Tablix1. In addition, Reporting Services shows you the data that feeds the region based on the report parameters selected.

    103011_0010_ReportingSe2

  3. In the right pane, click the Add Rule button to specify criteria for activating the alert. In my case, I want the alert to be triggered for the Accessories product category, Bike Racks product subcategory, year 2007, quarter Q4, and Sales greater than 70,000. As the report data shows, currently the Sales value for these criteria is 60,883.20. As new data is coming in, this value will probably increase and I want to be notified after it exceeds 70,000. I set the alert schedule to run on a daily basis (other options include Weekly, Hourly, or Minute).
  4. Next, you specify the e-mail addresses of the recipients who will get notified when the criteria are met and the e-mail subject text. Once you click Save, the alert is saved in the Reporting Services database and scheduled for execution with the SQL Server Agent. I can see and manage the alerts I’ve created by expanding the report context menu in SharePoint and clicking Manage Data Alerts.

    Reporting Services data alerts have the following limitations:

    1. They are only available in SharePoint. Reporting Services in native mode doesn’t support data alerts.
    2. They are supported with operational reports only, such as reports created by Report Designer or Report Builder and deployed to the SharePoint. Data alerts cannot be created on Power View reports.
    3. Similar to subscriptions and report caching, data alerts require stored credentials. Consequently, developers targeting BISM Multidimensional or Tabular must go through the same hoops (none of them easy) to use alerts with Analysis Services. If you are not happy about this limitation, please vote for my suggestion on connect.microsoft.com that is time for Microsoft to address this limitation.

SQL Server 2012 data alerts extend the Reporting Services capabilities to poll reports and trigger notifications when report data changes. If you target data sources that require standard security (login and password), the feature is very easy to use and business users will probably love it.