Features

SSAS (OLAP Cube)

SSAS (OLAP Cube)

The PivotEngine component connects directly to OLAP cube provided by SSAS server.

Features

header
Customer
header
header
Occupation
header
Country
header
Customer Count (Sum)
Occupation:Clerical;Customer Count:0;
Occupation:Management;Customer Count:0;
Occupation:Manual;Customer Count:0;
Occupation:Professional;Customer Count:0;
Occupation:Skilled Manual;Customer Count:0;
Customer Count:0;
436
771
248
1,436
700
3,591
166
245
25
548
587
1,571
558
95
788
235
134
1,810
566
129
673
259
153
1,780
589
176
609
275
264
1,913
613
1,659
41
2,767
2,739
7,819
2,928
3,075
2,384
5,520
4,577
18,484

Settings

Description

The PivotEngine allows to connect directly to OLAP cubes provided by SSAS servers.

Set the CubeService.Url and CubeService.Cube properties that specify how the component should access the service.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
using System.Web.Mvc;
 
namespace OlapExplorer.Controllers.Olap
{
    partial class OlapController : Controller
    {
        // GET: Cube
        public ActionResult Cube()
        {
            OlapModel.ControlId = "cubePanel";
            ViewBag.DemoSettingsModel = OlapModel;
            return View();
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
@{
    ClientSettingsModel optionsModel = ViewBag.DemoSettingsModel;
}
 
@(Html.C1().PivotEngine().Id("cubeEngine")
        .ShowRowTotals(ShowTotals.Subtotals)
        .ShowColumnTotals(ShowTotals.Subtotals)
        .BindCubeService("https://ssrs.componentone.com/OLAP/msmdpump.dll", "Adventure Works")
        .Fields(pfcb =>
            pfcb.Items(c =>
            {
                c.AddCubeField(fb => fb.Header("Customer")
                    .DimensionType(DimensionType.Dimension)
                    .SubFields(sfsb =>
                    {
                        sfsb.Add(s => s.Header("Country").Binding("[Customer].[Country]")
                            .DataType(C1.Web.Mvc.Grid.DataType.String).DimensionType(DimensionType.Hierarchy));
                        sfsb.Add(s => s.Header("Occupation").Binding("[Customer].[Occupation]")
                            .DataType(C1.Web.Mvc.Grid.DataType.String).DimensionType(DimensionType.Hierarchy));
                        sfsb.Add(s => s.Header("Customer Count").Binding("[Measures].[Customer Count]")
                            .DataType(C1.Web.Mvc.Grid.DataType.Number).DimensionType(DimensionType.Measure));
                    })
                );
            }
        ))
        .RowFields(pfcb => pfcb.Items("[Customer].[Country]"))
        .ColumnFields(cfcb => cfcb.Items("[Customer].[Occupation]"))
        .ValueFields(vfcb => vfcb.Items("[Measures].[Customer Count]"))
)
 
<div class="row">
    <div class="col-sm-4 col-md-4">
        @Html.C1().PivotPanel().Id(optionsModel.ControlId).ItemsSourceId("cubeEngine")
    </div>
    <div class="col-sm-8 col-md-8">
        @Html.C1().PivotGrid().Id("indexGrid").ItemsSourceId("cubeEngine")
    </div>
</div>
 
@section Description{
    <p>@Html.Raw(Resources.Olap.Cube_Text0)</p>
 
    <p>@Html.Raw(Resources.Olap.Cube_Text1)</p>
 
}
@section Summary{
    <p>@Html.Raw(Resources.Olap.Cube_Text2)</p>
 
}