Archive

Archive for the ‘SharePoint’ Category

So i requested a PowerPivot workbook from SharePoint, what happens?

January 10th, 2010 4 comments

In my previous blog posts we made use of a published PowerPivot workbook to use a datasource. In this post we are going to discover what goes on under the hood  when you call a PowerPivot workbook on a SharePoint 2010 server. Thanks to Denny Lee from the PowerPivotTwins for reviewing this post, clearing some things up and providing excellent information.

When I make a connection with the browser to the workbook of a published xlsx by clicking the PowerPivot gallery the following things happen:

  • The Excel web access service starts rendering the workbook
  • It will connect to Excel Calculation Services which will extract the workbook from the SharePoint content dB
  • The workbook is rendered as it was published, whatever slicers that were chosen at the point of publishing will be shown as is, including the data at the point of publishing.
  • When you interact with the workbook the following happens:
    • Excel Web Access connects to Excel Calculation services which then connects to the OLE DB Provider for Analysis Services. Because it (MSOLAP) recognizes this as a published workbook, it will then redirect the request to the PowerPivot System Service.
    • PowerPivot System Service opens a request to the Analysis Services Engine Service to get the data to be rendered if the data has already been uploaded.
    • Otherwise, the PowerPivot System Service will obtain the workbook (remember Excel Services has already grabbed it), extract the database from it, find the right Analysis Services Engine Service (based on round robin or health status), and attach it to the Analysis Services Engine Service. You can see this latter action from the SSAS Profiler trace:

      <ImageLoad xmlns=”http://schemas.microsoft.com/analysisservices/2003/engine” xmlns:ddl100=”http://schemas.microsoft.com/analysisservices/2008/engine/100” xmlns:ddl200_200=”http://schemas.microsoft.com/analysisservices/2010/engine/200/200” xmlns:ddl100_100=”http://schemas.microsoft.com/analysisservices/2008/engine/100/100“>
      <ddl200_200:ImagePath>C:\Program Files\Microsoft SQL Server\MSAS10_50.GEMINIBI\OLAP\Backup\Sandboxes\DefaultGeminiServiceApp\ReadOnlyExclusive-006bc445-9ea7-419d-ab2d-886f33b89a03-BP.xlsx</ddl200_200:ImagePath>
      <ddl200_200:ImageUniqueID>213a3a72-eb2d-4646-aa6d-46d9baf5c070</ddl200_200:ImageUniqueID>
      <ddl200_200:ImageVersion>01/09/2010 20:01:13</ddl200_200:ImageVersion>
      <ddl200_200:ImageUrl>http://sp2010ppdemo/PowerPivot Gallery/BP.xlsx</ddl200_200:ImageUrl>
      <ddl100_100:DbStorageLocation>C:\Program Files\Microsoft SQL Server\MSAS10_50.GEMINIBI\OLAP\Backup\Sandboxes\DefaultGeminiServiceApp</ddl100_100:DbStorageLocation>
      <ddl100:ReadWriteMode>ReadOnlyExclusive</ddl100:ReadWriteMode>
      <DatabaseName>BP Sandbox 006bc445-9ea7-419d-ab2d-886f33b89a03</DatabaseName>
      <DatabaseID>006bc445-9ea7-419d-ab2d-886f33b89a03</DatabaseID>
      </ImageLoad>
      <PropertyList xmlns=”urn:schemas-microsoft-com:xml-analysis”>
      <LocaleIdentifier>1033</LocaleIdentifier>
      </PropertyList>

      next the cube database is restored from xml files inside the powerpivot data:

      \\?\C:\Program Files\Microsoft SQL Server\MSAS10_50.GEMINIBI\OLAP\Backup\Sandboxes\DefaultGeminiServiceApp\A45D056461D04A8195CE\MS_8377d9f7-8722-452e-8128-71168e30562b.2.db\Sandbox.492.cub.xml; Size=24KB

      These files are XML so you can open them, this file contains the definition of the cube, what drew my attention was:

      <StorageMode valuens=”ddl200_200″>InMemory </StorageMode>

      Which means the analysis cube itself is being loaded straight into memory We probably can use this to load our own cubes into memory in a future release.

      When the cube is restored the data is then loaded from files within the workbook.

      As last step some additional metadata like security is loaded, then the model (The PowerPivot terminology of a cube is model) is available in the Analysis Services Engine Service

  • A MDX query is fired to the SSAS cube to return the data:

    SELECT {[Measures].[Total last month of year],[Measures].[AVG YTD last year],[Measures].[Trend prev year],[Measures].[Total last month -1 of year],[Measures].[Trend this year],[Measures].[Total same month previous year],[Measures].[Trend 2 years]} DIMENSION PROPERTIES PARENT_UNIQUE_NAME,HIERARCHY_UNIQUE_NAME ON COLUMNS , NON EMPTY CrossJoin(Hierarchize({DrilldownLevel({[DimPromotion].[EnglishPromotionCategory].[All]},,,INCLUDE_CALC_MEMBERS)}), Hierarchize({DrilldownLevel({[DimPromotion].[EnglishPromotionName].[All]},,,INCLUDE_CALC_MEMBERS)})) DIMENSION PROPERTIES PARENT_UNIQUE_NAME,HIERARCHY_UNIQUE_NAME ON ROWS FROM [Sandbox] WHERE ([DimSalesTerritory].[SalesTerritoryRegion].&[Central],[DimDate].[CalendarYear].&[2008]) CELL PROPERTIES VALUE, FORMAT_STRING, LANGUAGE, BACK_COLOR, FORE_COLOR, FONT_FLAGS

    <PropertyList xmlns=”urn:schemas-microsoft-com:xml-analysis” xmlns:soap=”http://schemas.xmlsoap.org/soap/envelope/”><Catalog>BP Sandbox 006bc445-9ea7-419d-ab2d-886f33b89a03</Catalog><Timeout>276</Timeout><Content>SchemaData</Content><Format>Multidimensional</Format><AxisFormat>TupleFormat</AxisFormat><DbpropMsmdFlattened2>false</DbpropMsmdFlattened2><SafetyOptions>2</SafetyOptions><Dialect>MDX</Dialect><MdxMissingMemberMode>Error</MdxMissingMemberMode><DbpropMsmdOptimizeResponse>1</DbpropMsmdOptimizeResponse><LocaleIdentifier>1033</LocaleIdentifier><DbpropMsmdMDXCompatibility>1</DbpropMsmdMDXCompatibility><DbpropMsmdSubqueries>2</DbpropMsmdSubqueries></PropertyList>

  • The data is then put from the Analysis Services Engine Service into the rendered workbook by the excel services. It goes through PowerPivot System Service but it never actually does anything – from this point onwards, its just about directing the traffic.
  • Excel Calculation services passes the workbook to the Excel web access layer who passes it on to the browser.
  • The PowerPivot enabled Excel worksheet is rendered in the browser with the new interactive data

Sources for this post are:

Article on BOL which explains how the loading happens: Plan for PowerPivot Integration with Excel Services with a great diagram describing the steps:


(Although Denny pointed out: The diagram about Powerpivot System Service getting data form the content database isn’t right. It will get some metadata from the SharePoint SQL database store, but doesn’t actually get the data from there.)
and  the PowerPivotTwins (Denny Lee and Dave Wickert) downloadable Academy Live presentation with in depth server architecture

A few things to keep in mind:

  • Data is not refreshed when you call a workbook, only by scheduling a data refresh
  • Caching occurs by loading the SSAS database into memory, after a while of not using the app the database is deleted from the SSAS server (so never connect to the database itself, always to the workbook)
  • First time a workbook is interacted will be slow, after that fast.
  • Caching of  the PowerPivot data of a workbook is for all users not per user (caching at database level)
  • For a Excel workbook at Excel Services, caching is at the user level

I hope this gives you more insight in what goes on on the server side of PowerPivot

Manage the sort order of your PowerPivot sheets in the SharePoint Gallery

January 9th, 2010 No comments

I was playing around with my new SharePoint machine and when i openend the PowerPivot gallery i asked myself how can we manage the sort order of the powerpivot sheet ourselves. Luckily the PowerPivot gallery is a just a regular SharePoint list.

This is the gallery now: 

when you look at the list properties you see:

It will be sorted on the modified date. What we are going to do is add a new column to the list where we are going to sort on, click create column:

And add a new numeric column:

We have some default views available:

The All documents view shows us the list as a traditional list, click the modify view and select the sortorder to show up in the view. You now can edit the properties of an item and set the sortorder:

When you go back to the Gallery view, click modify view again and select the sortorder as column to sort on, this gives you your own way of sorting the gallery:

PowerPivot workbook not showing up in SharePoint PowerPivot Gallery

January 9th, 2010 No comments

One important thing to remember when you call your SharePoint Powerpivot Gallery. Use the computername to connect, so no IP adress or localhost in your IE. No workbooks will show up when you don’t use the computername. When you did make a single box install but still want to access the SharePoint from a remote machine just add the ipadress and computername to your host file, and log in with the sharepoint credentials.

Run SharePoint 2010 with PowerPivot next to your Windows 7 with Hyper-V

January 8th, 2010 No comments

I was searching for a way to run SharePoint 2010 with PowerPivot on my laptop. My colleague Roel van Lisdonk told me about the possibility to run a virtual machine next to your regular OS using Hyper-V, the mayor advantage is you have all your hardware at your disposal without having the hassle of running your machine in dual boot. All you have to do is create a VHD file, reboot, run the installation disc, mount the VHD while installing and install on the vhd. When installation finished you can dual boot from the VHD file. Excellent !

This great post on ZDNET describes how it works, just follow it (use a Server 2008 R2 disc instead of Windows 7) and run SharePoint with all you hardware available:

How-to: Getting started with .VHD files in Windows 7

After installation use the Vidas Matelis install guide to install SharePoint 2010 with PowerPivot.

Happy SharePointing !

Creating a PerformancePoint 2010 dashboard on a published SharePoint PowerPivot app

January 4th, 2010 5 comments

In my previous PowerPivot post i created a SSRS report based on a published PowerPivot app with DAX measures. In this post we are going to create a PerformancePoint 2010 dashboard based on the published PowerPivot App and publish it to SharePoint. First you need to enable PerformancePoint in SharePoint 2010, to do this the PerformancePoint team has created an excellent blog post: Deploying PerformancePoint 2010 Soup to Nuts

Ok we start at the PerformancePoint site:

And click start using PerformancePoint Services:

Click the Run dashboard designer button to start the o so familiar dashboard designer (same as 2007). we start by adding a Datasource which points to our PowerPivot xlsx:

I selected the “Per user identity” because i haven’t got my installation really ok (the unattended service account is not installed). Next we can create a scorecard, right mouse on PerformancePoint content, new, Scorecard

Select analysis services and click OK, select the datasource we just created:

We need to create the KPI ourselves, so we select the measures created in PowerPivot, I want to see the the totals sales last month measured against the avg last year, we select the band method “increasing is better”, because more ordeer are better :)

We select the year we want our KPI shown against

The next steps we keep the default values, click finish to create and load the dashboard:

Now we want to show the sales kpi by Promotioncategory, you can drag the dimension you want into the scorecard. Don’t forget to click update to show the new result.

I rather like other indicators than the default, so go to the KPI, click scoring and patterns and doubleclick the indicator to select a new indicator, I like the indicator below:

save the indicator, go to the scorecard and update again:

Next i wanted to get a graph to show the orderquantity by year, create a new report and select graph. Put the measure in series and calendaryear on the bottom axis.

Last we create the dashboard to show the data, i created a 2 column dashboard with a top bar. I dragged the scorecard to the right column and the chart report in the left column. You can add a date selection in the top bar when want, or even the new time intelligent filter. I did not add one this time. 

Next we save and deploy the dashboard to SharePoint:

It will automaticly open the dashboard in SharePoint, looks great in my opinion:

As last item I wanted to show you one neat thing: the new silverlight decomposition tree. Right click on a bar in the chart and click decomposition. I clicked on the 2007 bar. 

 

When you click the value you can expand the value to a dimension and so on:

Using PerformancePoint on a PowerPivot App is another great way to show the data to you customers, the creation of dashboards are doable for the analysts.

Installing SSRS 2008 R2 on SharePoint 2010

December 22nd, 2009 5 comments

After installing PowerPivot on SharePoint 2010 thanks to the excelent guid of VidasM i decided to try and install report services 2008 R2.

To start I downloaded the SQL Server® 2008 R2 November CTP Reporting Services Add-in for Microsoft SharePoint® Technologies 2010 and followed the instructions there:

Step 1: Install a SharePoint technology instance. (Already did this when installing PowerPivot with SharePoint)

Step 2: Install SQL Server 2008 R2 November CTP Reporting Services and specify that the report server use SharePoint Integrated mode.

Step 3: Configure Reporting Services.

Step 4: Download the Reporting Services Add-in by clicking the rsSharePoint.msi link later on this page. To start the installation immediately, click Run.

After installing Reporting services and the add-in your reporting server is ready to be integrated with SharePoint, in SharePoint 2010 we have some new admin screens.

To integrate go to central admin, general application settings:

When you successfully installed the add-in a reporting services icon will be there. Click Reporting Services Integration:

Add the report server web service url (To get the URL, open the Reporting Services Configuration tool, connect to the report server, and click Web Service URL. Click the URL to verify it works. Copy the URL and paste it into Report Server Web Service URL.), select your authentication mode (windows authentication is prefered). Add a username and password of your admin account. Click ok to configure and start the integration.

After the installation you can set the reporting services default.

What is changed in SP2010 is that there isn’t a report library available. You have to add content types to a default library. So go to a site collection, site actions,  View all site content.

Create a Asset library:

Now we have to make sure we can add reports to the library. To do this we have to add content types:

Open the library, click on library tools, library settings, Under Content Types, click Add from existing site content types. In the Select Content Types section, in Select site content types from, click the arrow to select Reporting Services. In the Available Site Content Types list, click Report Builder, Report Data Source and Report and then click Add to move the selected content type to the Content types to add list.

Now we are ready to upload reports and execute them from within our webparts:

More reading about this on BOL:

How to: Configure Report Server Integration in SharePoint Central Administration

How to: Add Report Server Content Types to a Library (Reporting Services in SharePoint Integrated Mode)

SharePoint 2010 beta error: Retrieving the COM class factory for component with CLSID {BDEADF26-C265-11D0-BCED-00A0C90AB50F} failed due to the following error: 800703fa

December 11th, 2009 1 comment

I’ve installed SharePoint 2010 with PowerPivot for some time now but since one week i have to do an IISRESET everymorning because i have error message on my SharePoint server:

Retrieving the COM class factory for component with CLSID {BDEADF26-C265-11D0-BCED-00A0C90AB50F} failed due to the following error: 800703fa.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {BDEADF26-C265-11D0-BCED-00A0C90AB50F} failed due to the following error: 800703fa.

Thanks to the internet i found the a workaround:

- Doing an IISReset solves it but it could appear again

- Go to IIS Manager, select the Application Pool for your web application and click Advanced settings, change the value for “Load User Profile” to “true”

Thanks to Bassem Georgi (MSFT)

Calling your PowerPivot workbook on SharePoint 2010 remotely

December 1st, 2009 No comments

I have created a SharePoint 2010 image with PowerPivot integration with the help of Vidas installation guide, after creating it locally I found out a VM with 2 GB of memory was too small. So I decided to try my luck at our server admins. They were so kind to create a machine for me on their farm :) So having transfered my image to the ESX servers logging in to Remote desktop i was able to acces SharePoint like before. But ofcourse i wanted to share my SharePoint with PowerPivot installation with my colleagues and sales.

When i called SharePoint on its IP adress i got a log in screen. After logging in on the local domain SharePoint and the PowerPivot gallery showed Ok, but selecting the PowerPivot sheet gave a file not found error:

error

At first i suspected some kind of security problem, but after checking the log files i found the following error:

12/01/2009 13:19:38.29  w3wp.exe (0x010C)                        0x13E4 SharePoint Foundation          Configuration                  8059 Warning  Alternate access mappings have not been configured.  Users or services are accessing the site http://sp2010beta with the URL http://172.31.20.10.  This may cause incorrect links to be stored or returned to users.  If this is expected, add the URL http://172.31.20.10 as an AAM response URL.  For more information, see: http://go.microsoft.com/fwlink/?LinkId=114854″/> f998f54f-ab53-4f0d-afac-859a9c4e67b4

After consulting with colleague Marc Valk i added the hostname and IP adress to the host file of the server. In my case:
172.31.20.10      sp2010beta
127.0.0.1             sp2010beta

and gave a ipconfig /flushdns.

I added 172.31.20.10      sp2010beta to my local host file, restarted my IE and called the site by its hostname http://sp2010beta worked like a charm !