MicroStrategy ONE
Thick Client Application
The Thick Client application demonstrates how MicroStrategy Web can be embedded into a third-party application that uses the URL API to display MicroStrategy content within .NET browser controls. The purpose of this sample application is to illustrate how the URL API can be used to embed BI functionality into other applications. Any action that can be executed by MicroStrategy Web can, potentially, be triggered by a URL or a form submission. This sample application illustrates embedding MicroStrategy Web with a Thick Client application, but MicroStrategy Web can also be embedded into other third-party applications, such as portals and rich internet applications. The Thick Client application is located in the samples/DotNET/ThickClient folder in the MicroStrategy SDK installation directory.
Because MicroStrategy Web was built using Java as the main development language and this sample application uses a .NET browser, the Thick Client application uses the SessionHelperBridge to help it create a new session with MicroStrategy Intelligence Server. The MicroStrategy SDK includes the SessionHelperBridge.dll library, which allows Microsoft-based applications to create new sessions with MicroStrategy Intelligence Server in a .NET environment. This library provides a very simple bridge to specify certain properties such as the name of Intelligence Server, the name of the project, and the user credentials. In the Thick Client application, users can modify these and other properties in the MicroStrategySession.vb file.
The URL used in this sample application assumes that MicroStrategy Web Universal is running on the local machine. The .NET version of the URL is commented out so that it can be used when appropriate.
The URL used in this sample application assumes that MicroStrategy Web Universal is running on the local machine. The .NET version of the URL is commented out so that it can be used when appropriate.
The Thick Client sample application simulates a dashboard, with two tabs that each have .NET browsers embedded in them. The first tab—Financial Reports—displays a report in one browser, and the second tab—Revenue Comparison—displays two reports that are each in a separate browser.
Financial Reports Tab
Users can perform the following two operations on the report that is displayed in the browser on the Financial Reports tab:
-
Page-by on metrics and on the attributes, Region and Country
-
Change the number of categories shown in the graph
Revenue Comparison Tab
Users can perform a page-by operation simultaneously in the two reports displayed in the browsers on the Revenue Comparison tab.
The reports on both tabs are executed first using the hidden customXMLReport page, which returns an XML version of the report that includes the message ID. These XML representations are parsed in the getMessageIDFromBrowser method of the Thick Client application. The message IDs are saved in variables, and their values are used to build the URLs that display the reports on the two tabs. The URLs access the customReport page, which has been customized to show only the content and the path page sections and not to display any page sections that are MicroStrategy-specific.
The code shipped in the DashboardForm.vb file includes some examples on how users can access content from MicroStrategy Web.Specifying the correct environment for the Thick Client Application plug-in
The Thick Client Application plug-in can be used in either a J2EE or an ASP.NET environment. To specify the correct environment, you must verify that the code in one of the vb files is properly commented and configured. To do this:
-
Open the solution file for the project.
-
In the solution, open the DashboardForm.vb file.
-
In DashboardForm.vb, there are two comments related to selecting between a J2EE and an ASP.NET environment—one for the URL and the other for the servlet name. Make sure that the two lines of code for your environment are not commented out and the two lines of code for the other environment are commented out.
-
In DashboardSession.vb, you need to add the correct session information.
-
The reports on the second tab both use a page-by with years that are hard-coded in DashboardSession.vb. Make sure that the years in the .vb code match the years in the data.
Customizing MicroStrategy Web to work with the Thick Client Application
In order to use the Thick Client sample application, you need to deploy the plug-in provided with MicroStrategy SDK. To do this, you
-
Access the plug-in: JSP version or ASP .NET version
-
Extract the plug-in to the plugins folder inside the MicroStrategy Web installation folder.
Tweaking the references on the .NET solution file
This sample application requires DLLs installed with MicroStrategy Web (ASP.NET) and the MicroStrategy SDK. By default, MicroStrategy Web is installed in the C:\Program Files\MicroStrategy\Web ASPx folder. You must manually install the MicroStrategy SDK, but this sample assumes that you have installed it in the C:\Program Files\MicroStrategy\SDK folder. Some of the references on the DashboardProject.vbproj file point to DLLs from these two folders. If you installed MicroStrategy components in a different path, you will have to update the path in Visual Studio.
The following table lists the components and their assumed locations:
Component |
Location |
---|---|
MBBRIBASLib.dll |
Program Files\MicroStrategy\Web ASPx\bin |
MLJBRINF.dll |
Program Files\MicroStrategy\Web ASPx\bin |
MLMGDINF.dll |
Program Files\MicroStrategy\Web ASPx\bin |
SessionHelperBridge.dll |
Program Files\MicroStrategy\SDK\samples\DotNET\SessionHelperBridge\SessionHelperBridge.dll |
The sample application was created and compiled using Visual Studio 2010 and .Net Framework 4.0.
Open the Dashboard.sln file from Visual Studio 2005 to make changes to or recompile this sample application.