SharePoint Integration with MicroStrategy

0
Recently, while working on one of my project assignments I got to work on the integration of SharePoint 2010 with MicroStrategy 9. The requirement was to pull the report from the MicroStrategy and show that in a web part. We had the MicroStrategy environment set up and also I had my SharePoint development environment set up.Here, I will show you how you can configure the SharePoint environment to pull reports from the MicroStrategy. When you contact MicroStrategy for their portlets, which can be plugged with SharePoint, you will get a .CAB file. This CAB file has two web parts in it 1) ‘MicroStrategy Master Web Part’ 2) ‘MicroStrategy Web Part’. This also has MSTRWebParts.dll which, you can use to create a custom web part to display data from MicroStrategy(I will talk about this in other post), and a few .js files. You might be thinking “Enough of talking, Take me to the procedures of configuration”. So here you go:
Step 1: Install the CAB file: Log in to the server machine as an Administrator. To install the CAB file you can use following commands:stsadm.exe -o addwppack -filename “$your_location_of_cab_file$\MSTRWebParts.CAB”. 

Step 2: Configuring security for the MicroStrategy Web Part:
To configure the security either you can elevate the permission level to ‘Full Trust’ in the web.config file, which is neither a good practice nor secure, or you can use Trust level as WSS_minimal” and modify the appropriate policy configuration file which is located at “C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Config\wss_minimaltrust.config” and make an entry for MSTRWebParts.dll in the <CodeGroup> section. You can read more about it over the net. There are many good articles explaining “Custom CAS policy for SharePoint”. You can also follow this Microsoft documentation.

Step 3: Enabling HTTP Session State in SharePoint

The MicroStrategy Web Part for the SharePoint Portal requires the HTTP Session State to be enabled. However, by default, HTTP Session State is disabled by the SharePoint Portal Server. To enable the HTTP Session State in SharePoint Portal 2010, you must modify the web.config file for SharePoint (located by default under C:\Inetpub\wwwroot\wss\VirtualDirectories\ and SharePoint Admin (located by default under C:\Inetpub\wwwroot\wss\VirtualDirectories\.

Note: It is a good practice to make a backup of important configuration files, such as the web.config file, before making changes.

To enable HTTP Session State, use any text editor to make the following changes to the web.config files in the locations described above:

  1. Enable the SessionStateModule:
Add the node shown in bold below as a child node for the node:Before:<httpModules/>

After:

<httpModules>

<add name=”Session” />

</httpModules>

    1. Enable the SessionState:

Find the node beneath . Set the enableSessionState attribute to “true”.

  1. Add the session state module to the IIS (Internet Information Services) 7 managed pipeline for MicroStrategy Web.
    1. Open IIS 7 Manager and find SharePoint.
    2. Double-click Modules in the IIS section.
    3. Click Add Managed Module … in the right-hand pane.
    4. On the Add Managed Module dialog, enter a name such as “SessionState” and choose System.Web.SessionState.SessionStateModule from the dropdown.
  2. Restart IIS for the changes to take effect.

Step 4: Creating User Profiles for MicroStrategy Credentials and Locals:

To set user credentials and locales for a MicroStrategy Web Part, you must add the necessary user profile properties on the SharePoint Portal Server. To set these properties, do the following:

  1. Open SharePoint Central Administration, click Manage Service Applications under Applications and then click on User Profile Service Application. On the page that opens, click on Manage User Properties under People and then click on New Property
  2. In the Property Settings textboxes, add the properties listed below, using the values provided or indicated. If you want to give users the ability to change credentials or set locales, choose “Allow users to edit values for this property” in the Edit Settings options.
    Property
    Settings
    Name
    DataLocale
    DisplayLocale
    MSTR-UID
    MSTR-PWD
    MetadataLocale
    Display name
    Data Locale
    Display Locale
    MicroStrategy User
    MicroStrategy
    Password
    Metadata Locale
    Type
    integer
    integer
    string
    string
    string
    integer
    Sub-type of Profile
    Make sure that the checkbox for “Default User Profile Sub-type” is checked
    Policy Settings
    Select “Optional”, rather than “Required” (which is the default selection)
    Edit Settings
    Select “Allow users to edit values for this property”

    When you make these property settings, you must use the exact property names and types shown in the table above, but you can use different display names if you want.

    You can choose whether or not to let user see or edit these settings. To give users the ability to change credentials or set locales in a MicroStrategy Web Part, you must add the necessary user profile properties on the SharePoint Portal Server.

    If you don’t want Web Part users to be able to change the data locale or display locale, the DisplayLocale and DataLocale profile properties are optional. In this case, the SharePoint Portal user’s language setting will be used for these two locales. If you use only Windows Authentication or Guest Authentication, the MSTR-UID and MSTR-PWD profile properties are also optional.

    If you don’t want to allow Web Part users to change the values for any of their user profile properties (DataLocale, DisplayLocale, MSTR-UID, or MSTR-PWD) on the edit pane, you should not change Edit Settings to “Allow Users to edit values for this property”. When this setting is not made, only portal server administrators can assign and change the values for these profile properties in the Shared Services Administration page.

That’s it. You are good to go now. Go to the page>Edit Page and add “MicroStrategy Web Part” to it and configure all its values. If you have proper permissions to your MicroStrategy environment then you should be able to see the report that you have configured in the web part settings.

 

[This blog may not be relevant]

Conditional alerts in MicroStrategy…. that to not using Narrowcast Server

Last week, one of our clients had hugh increase in the sales numbers. Everyone in the BI team gets reports regarding data; data load status, etc as soon as it is over. Local team was a bit amused and prima facia client ath “finally Christmas sale has picked up”. Wow.. but when ETL team looked closely, we came to know that was issue with data provided by mainframe team. Scheduler uploaded two copies of the files in the folder under which all files are loaded blindly into data warehouse. Rarely faced any issue like double file.

 

I asked my colleague, who is a Narrowcast champ, why can’t we have few schedules/alters for data load errors. He told me that they were already having several emails regarding data load status. Personally, it is a bad idea to receive data load status report on daily basis, as chance of an error is next to nil and you may forget to read automated status report. (Though he manages the status religiously and had instantly pointed out to ETL team regarding this issue that day, I was looking for conditional alerts. My friend told me that conditional alerts are only possible using FF SQL reports, also we need to use Windows scheduler to activate the alerts and need to compare if we require it to send only if some condition is met. Pretty messy and lengthy in Narrowcast server.

 

Finally, I found a very easy solution using Web subscriptions. Well….. it is possible to create an email subscription which will be executed when a certain conditional is satisfied. To create a conditional email subscription, use following steps.

1. Create reports with base metric and at least one threshold metric.

2. Execute the report.

3. From Right mouse click menu on any metric, select Alerts.

4. Alert editor (Similar to filter editor) opens up. You can specify the criteria.

5. Under Delivery settings, specify Schedule, email address, delivery format and any custom message.

6. Bonus: If you want another report to be sent if this condition is satisfied, you can specify the report name using “Send different report or document”.

MicroStrategy India is so lame

I know that MicroStrategy, Inc is very much pissed off by me not handing over the .IN and .CO.IN domains, but they have been very nice confirming the registration for events held. I really liked it. But looks like recent bash of speaker of event held on did not go too well with them. I had applied for MicroStrategy event on Mobile BI (to be held on 11th Nov on) and Enterprise BI (to be held on 9th Dec) on 14th Oct. While event to be held on Mobile BI was postponed and eventually cancelled, I was expecting that I would get confirmed invite for Mobile BI event in Nov. Events get cancelled due to not getting good industry speakers or good number of presence by decision maker (who decides on BI purchases). I was shocked when I received a application denial for Mobile BI. Receiving a reminder about denial was even bigger shock. Well, I though MicroStrategy must have been able to merge the vents and find good number of guys, so application rejection was some what acceptable. But, I felt something was a miss when even this event was postponed by a week. Did they fail to get speaker for such an event even after 3 months. Highly unlikely! but event seat not filled, possible. Still I was denied entry for this event.

But I was hoping that I would get the invite for Enterprise BI event for sure. After all I had applied almost 2 months in advance. But my joy was short lived when I received another email on 24th Nov itself regarding event being oversubscrbed and not able to accommodate me.I just checked with my friends with ex-employer regarding going for this events. They were simply unaware about this event. I didn’t inform my friends regarding them about so called over subscription. To my biggest surprise, they got (total 5 person) got confirmed invites for Enterprise BI event, even after having applied after me getting an over subscription notice. I some how doubt that this event was really postponed. Their (friend working in ex-employer) only fault was that they knew me.

I really don’t know why are they acting like a puss. Not to forget they just revoked access to MicroStrategy download site for my official id and blog id on the pretext of “not having a support agreement in place”. Really don’t know how far they will go.

MicroStrategy Cloud online (free)

In case if anyone wants to do dashboard mockup quickly, here is the link to build instant dashboards using Excel (using multidimensional view data) quickly;

 https://cloud3.microstrategy.com/MicroStrategy/servlet/mstrWeb (Not sure for how long it’s free and public)

Intelligent Cube : Incremental Cube Refresh

Data Refresh Options:

  1. Full Refresh: Same as in 9.0.1. Whole report will be refreshed
  2. Dynamic Refresh:  Data will be refreshed based on the filter on Cube

Example:

  • let’s say cube filter has ‘Today minus 5 days’
  • Assume cube published on 18th of September
  • So the Cube will hold data from Sept-13th to Sept-18
  • What happens when cube refreshed on Sept-20th (Now the cube should hold data from Sept -16th to Sept-20th)
  • When the cube refreshed, it generates filter condition as follows;

Incremental Data fetch Condition

(a11.DAY_DT between DATE '2011-09-15' and DATE '2011-09-20'  and (not a11.DAY_DT between DATE '2011-09-13' and DATE '2011-09-18'))

So the report fetches data for only two days

Later part of the Cube SQL, it deletes the old data which not required for the ‘Between Today minus 5 days as Sept-20th

Data Deletion Condition:

([Day]@[DAY_DT] between 2011-09-13 00:00:00.000 and 2011-09-18 00:00:00.000

 and [Day]@[DAY_DT] not between 2011-09-15 00:00:00.000 and 2011-09-20 00:00:00.000)

  • Update Option: Inserts new data and deletes overlapping rows between old and new

If any history gets updated then that can be also updated

  • Insert Option: Just inserts the data in the cube memory

SQL pattern for Dynamic Refresh option when cube published for second time (recursive);

SQLStatements:Pass0 –    Execution Duration: 0:00:01.50

                Data Fetch Duration from Datasource(s):            0:00:00.01

                Total Data Fetch Duration:   0:00:00.03

Other Processing Duration:      0:00:00.03

Rows selected: 343

select     a11.day_ID, Col1, Col2, Sum(Col3)

from

X a11 Join Y a12 on (a11.ID=a12.ID)

where     a11.ID2 in (a,b,c,d)

and        (a11.DAY_DT between DATE ’2011-09-15′ and DATE ’2011-09-20′

 and (not a11.DAY_DT between DATE ’2011-09-13′ and DATE ’2011-09-18′))

group by                1,2,3

Pass1 –    Execution Duration: 0:00:00.00

Data Fetch Duration from Datasource(s):            0:00:00.00

Total Data Fetch Duration:   0:00:00.00

Other Processing Duration:      0:00:00.01

[Populate Report Data]

Pass2 –    Execution Duration: 0:00:00.00

Data Fetch Duration from Datasource(s):            0:00:00.00

Total Data Fetch Duration:   0:00:00.00

Other Processing Duration:      0:00:00.03

Delete from CUBE               Incremental Test 1

where     ([Day]@[DAY_DT] between 2011-09-13 00:00:00.000 and 2011-09-18 00:00:00.000

 and [Day]@[DAY_DT] not between 2011-09-15 00:00:00.000 and 2011-09-20 00:00:00.000)

Pass3 –    Execution Duration: 0:00:00.00

Data Fetch Duration from Datasource(s):            0:00:00.00

Total Data Fetch Duration:   0:00:00.00

Other Processing Duration:      0:00:00.00

[Refresh target cube ([Incremental Test 1]; [GUID] data)

Rows inserted:         343

Rows deleted:         688

Rows updated:        0

]

What is ‘Define Incremental Refresh Report Option’ (right click on Cube)

 Filter Option:

Let’s say, the cube hold data for 4 weeks of data for countries Canada and USA. Now I want to include a Germany alone for the same 4 weeks. Then instead of modifying the original cube…we can make use of ‘Incremental Refresh Report Options’

  • Right click on Cube à select ‘define incremental refresh report options’
  • Add Germany to the filter
  • Save that as ‘Incremental Refresh’

Note:

  • The filter should use the any one of the attribute present in the Cube
  • Once incremental refresh is created, Cube should not refreshed only Incremental refresh can be scheduled
  • Any number of Incremental refresh can be created against one cube

Report Option: (Haven’t tried much on this option yet)

From MSTR :  This option allows you to define a report that is used for the incremental refresh. When the incremental refresh is executed, the results of the report are compared to the data that is already in the cube, and is updated based on the option you choose in the Incremental Refresh Options, General tab). It must include all the attributes and metrics that are present in the Intelligent Cube. The Report should have at least one metric from the cube.

Dynamic Sourcing:

If a normal grid holds same or few objects of an Cube, then dynamically I-Server determines that report has to hit the DB or Cube memory. Since in this example, grid holds few or same number of objects as in CUBE, the I-Server makes this report to hit Cube

PS:Thanks to my colleague who also helped me in my busy schedule to collect few good points on this topic.

Go to Top