This topic explains how to add the igOlapXmlaDataSource
™ to and HTML page and how to configure it for retrieving data from a Microsoft® SQL Server Analysis Services (SSAS) Server.
The following table lists the topics and concepts required as a prerequisite to understanding this topic.
Concepts
Topics
This topic provides an overview of the igOlapXmlaDataSource
component which uses SSAS instances for retrieving data.
Configuring IIS for Cross-Domain OLAP Data (igOlapXmlaDataSource)
This topic explains how to configure Internet Information Services (IIS) hosting HTTP data provider (msmdpump.dll
) for SQL Server Analysis Services (SSAS), for cross-domain access (both authenticated and non-authenticated access).
This topic contains the following sections:
The igOlapXmlaDataSource
makes the OLAP data from a SSAS server available for use in a JavaScript client environment. In order for the component to work correctly, the serverUrl property has to be specified. Also before using the component, you must initialize it.
Normally this data source component is used together with one of the OLAP pivot UI controls available with Ignite UI for jQuery.
Following are the general requirements for configuring igOlapXmlaDataSource
for working with an MS SSAS Server.
msmdpump.dll
HTTP data providerFollowing are the general conceptual steps for adding the igOlapXmlaDataSource
to an HTML page and configuring it for working with an MS SSAS Server.
Adding the required references to JavaScript files
Defining the igOlapXmlaDataSource
Initializing the igOlapXmlaDataSource
The following procedure defines and initializes an igOlapXmlaDataSource
object that connects to and obtains data from the Adventure Works sample database residing on an Infragistics® server.
The first step of the procedure offers both alternative ways for providing the references to the required JavaScript files – by using the Infragistics Loader and manually.
To complete the procedure, you need the following:
infragistics.olapxmladatasource.js
– the JavaScript file containing the igOlapXmlaDataSource
componentinfragistics.loader.js
– the Infragistics Loader component which can be used to automatically load all the Infragistics JavaScript and CSS files required by a componentmsmdpump.dll
Add the required references to JavaScript files
(Recommended) If using Infragistics Loader:
Add a reference to the Loader file. (No need to place references to the individual files)
<script src="js/jquery-1.9.0.js" type="text/javascript"></script>
<script src="js/infragistics.loader.js" type="text/javascript"></script>
If referencing files manually:
Add an individual reference to every required file.
<script src="js/jquery-1.9.0.js" type="text/javascript"></script>
<script src="js/infragistics.util.js" type="text/javascript"></script>
<script src="js/infragistics.util.jquery.js" type="text/javascript"></script>
<script src="js/infragistics.olapxmladatasource.js" type="text/javascript"></script>
Note: The jQuery version number may vary. The version number listed in the code is the latest as of this writing.
Define the igOlapXmlaDataSource
Create a new $.ig.OlapXmlaDataSource
object by calling its constructor function and then pass a JavaScript object containing the data source options as properties; at a minimum, you must specify the serverUrl
option.
Initialize the igOlapXmlaDataSource
Initialize the XMLA data source by calling the OlapXmlaDataSource
object’s initialize()
method that returns a promise object that will be resolved with the root MetadataTreeItem (The root node of the metadata tree). This is because the initialization is an asynchronous process (a call to the servers is made). The promise is an object that encapsulates an asynchronous operation exposing methods that can initiate and execute callbacks when the operation either completes or fails such as done, fail, etc.
Note: The jQuery version number may vary. The version number listed in the code is the latest as of this writing.
The following code demonstrates creating and initializing a new instance of the OlapXmlaDataSource.
In this code example, the serverUrl
setting points to an Infragistics server for XMLA data source.
In JavaScript:
$.ig.loader({
scriptPath: '[path to js folder]',
cssPath: '[path to css folder]',
resources: 'igOlapXmlaDataSource'
});
$.ig.loader(function () {
var dataSource = new $.ig.OlapXmlaDataSource({
serverUrl: 'http://sampledata.infragistics.com/olap/msmdpump.dll',
catalog: 'Adventure Works DW 2008',
cube: 'Adventure Works',
measureGroup: "Internet Sales",
rows: "[Sales Territory].[Sales Territory]",
columns: "[Product].[Product Categories]",
measures: "[Measures].[Internet Order Count]"
});
var promise = dataSource.initialize();
promise.done(function (metadataTree) {
// do something when the data source is initialized
}).fail(function (error) {
throw error;
});
});
In JavaScript:
$(function() {
var dataSource = new $.ig.OlapXmlaDataSource({
serverUrl: 'http://sampledata.infragistics.com/olap/msmdpump.dll',
catalog: 'Adventure Works DW Standard Edition',
cube: 'Adventure Works'
});
var promise = dataSource.initialize();
promise.done(function (metadataTree) {
// do something when the data source is initialized
}).fail(function (error) {
throw error;
});
});
The following topics provide additional information related to this topic.
Adding igOlapXmlaDataSource to an ASP.NET MVC Application: This topic demonstrates how to add the igOlapXmlaDataSource
to an ASP.NET MVC View using the ASP.NET MVC helper.
Configuring Authenticated Access for the Mozilla Firefox Browser (igOlapXmlaDataSource): This topic provides a workaround for configuring IIS for cross-domain authenticated access for the Mozilla® Firefox® browser.
Adding igPivotView to an HTML Page: This topic demonstrates how to add the igPivotView
™ to an HTML page.
Adding igPivotDataSelector to an HTML Page: This topic demonstrates how to add the igPivotDataSelector
™ to an HTML page.
Adding igPivotGrid to an HTML Page: This topic demonstrates how to add the igPivotGrid
™ to an HTML page.
The following samples provide additional information related to this topic.
Binding to Xmla Data Source: This sample demonstrates how to bind the igPivotGrid
to an igOlapXmlaDataSource
and uses an igPivotDataSelector
for data selection.
Remote Xmla Provider: This sample demonstrates one of the benefits of using the remote provider feature of the igOlapXmlaDataSource
- less network traffic. All requests are proxied through the server application to avoid cross domain problems. In addition, the data is translated to JSON reducing the size of the response.
View on GitHub