or
I am having trouble getting the Q3 2013 PivotGrid (most recent release) to display data from the Pivot Grid control.
My pivot grid definition (I have no code-behind related to it) is below, along with some code I have in the PageLoad function of the page. The code from the PageLoad function works fine, but I can't seem to get anything to display in the PivotGrid. According to the SQL 2012 docs, we don't need to use msmdpump.dll anymore for remote access. Is that part of my problem?
I have the Microsoft.AnalysisServices.AdomdClient (v11) referenced and in the bin folder of the web site.
Pivot Grid code:
<
telerik:RadPivotGrid
ID
=
"RadPivotGrid1"
runat
=
"server"
>
<
PagerStyle
ChangePageSizeButtonToolTip
=
"Change Page Size"
PageSizeControlType
=
"RadComboBox"
/>
<
OlapSettings
ProviderType
=
"Adomd"
>
<
AdomdConnectionSettings
Cube
=
"UtilitySmart"
Database
=
"UtilitySmart"
ConnectionString
=
"Data Source=SERVERNAME; Catalog=UtilitySmart;"
>
</
AdomdConnectionSettings
>
</
OlapSettings
>
<
Fields
>
<
telerik:PivotGridRowField
DataField
=
"[Dim Utility Smart Property].[Portfolio]"
Caption
=
"Portfolio"
UniqueName
=
"Portfolio"
/>
<
telerik:PivotGridAggregateField
DataField
=
"[Measures].[AmtPaid]"
Caption
=
"Amount Paid"
UniqueName
=
"AmtPaid"
/>
</
Fields
>
<
ConfigurationPanelSettings
EnableOlapTreeViewLoadOnDemand
=
"True"
LayoutType
=
"OneByFour"
/>
</
telerik:RadPivotGrid
>
var conn =
new
AdomdConnection(
"Data Source=SERVERNAME;Catalog=UtilitySmart;"
);
conn.Open();
var cmd =
new
AdomdCommand(
"SELECT [Dim Utility Smart Property].[Portfolio].Members ON ROWS, [Measures].[Amt Paid] ON COLUMNS FROM [UtilitySmart] "
, conn);
var resultObj = cmd.Execute();
protected void ValidateButton_Click(object sender, EventArgs e)
{
// Foreach loop that will need to access the header controls and determine what a user selected in a dynamically injected //combobox...
//
}
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
if (e.Item is GridHeaderItem)
{
GridHeaderItem item = e.Item as GridHeaderItem;
var columnName = "Column";
var columnCount = 0;
foreach (GridColumn col in RadGrid1.MasterTableView.AutoGeneratedColumns)
{
RadComboBox radCombo = new RadComboBox();
radCombo.ClientIDMode = ClientIDMode.Static;
radCombo.ID = "Column" + columnCount;
radCombo.EmptyMessage = "Select Field";
//Need to get fields and etc,then loop and add
var receiveByTagsFields = GetReceiveByTagFields(Convert.ToInt32(PurchaseShipmentUid));
foreach (var field in receiveByTagsFields.ReceiveByTagImportFields.OrderBy(x => x.Label))
{
RadComboBoxItem CBitem = new RadComboBoxItem();
CBitem.ClientIDMode = ClientIDMode.AutoID;
CBitem.Text = field.Label;
CBitem.Value = field.Id.ToString();
radCombo.Items.Add(CBitem);
}
if (receiveByTagsFields.MetaFields.Count() != 0)
{
foreach (var field in receiveByTagsFields.MetaFields.OrderBy(x => x.Label))
{
RadComboBoxItem CBitem = new RadComboBoxItem();
CBitem.ClientIDMode = ClientIDMode.AutoID;
CBitem.Text = field.Label;
CBitem.Value = field.InventoryMetaUid.ToString();
radCombo.Items.Add(CBitem);
}
}
LinkButton link = new LinkButton();
link.ClientIDMode = ClientIDMode.AutoID;
link.Text = "Edit";
LiteralControl br = new LiteralControl("<
br
/>");
if (col.ColumnType == "GridBoundColumn" || col.ColumnType == "GridNumericColumn")
{
item[col.UniqueName].Controls.Add(br);
item[col.UniqueName].Controls.Add(radCombo);
}
radCombo.Items.Add(new RadComboBoxItem("Do not import", "-1"));
columnCount++;
}
}
}
<
telerik:RadAjaxPanel
ID
=
"RadAjaxPanel1"
runat
=
"server"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
Width
=
"100%"
EnableAJAX
=
"True"
>
<
telerik:RadWindowManager
ID
=
"RadWindowManager1"
runat
=
"server"
width
=
"700px"
Height
=
"525px"
ReloadOnShow
=
"True"
>
<
Windows
>
<
telerik:RadWindow
runat
=
"server"
ID
=
"Window"
Behaviors
=
"Move, Resize, Close, Reload"
VisibleStatusbar
=
"false"
>
<
ContentTemplate
>
<
telerik:RadGrid
ID
=
"_SearchResults"
runat
=
"server"
AllowPaging
=
"True"
CellSpacing
=
"0"
GridLines
=
"None"
ShowGroupPanel
=
"True"
AllowSorting
=
"True"
PageSize
=
"25"
Width
=
"100%"
Height
=
"700px"
AllowFilteringByColumn
=
"True"
OnItemCommand
=
"_SearchResults_ItemCommand"
>
<
GroupingSettings
CaseSensitive
=
"False"
/>
<
ExportSettings
IgnorePaging
=
"True"
OpenInNewWindow
=
"True"
ExportOnlyData
=
"True"
FileName
=
"CUCustomSearch"
>
<
Excel
AutoFitImages
=
"True"
Format
=
"ExcelML"
/>
<
Pdf
PageHeight
=
"210mm"
PageWidth
=
"297mm"
DefaultFontFamily
=
"Arial Unicode MS"
PageTopMargin
=
"45mm"
BorderStyle
=
"Medium"
BorderColor
=
"#666666"
>
</
Pdf
>
</
ExportSettings
>
<
ClientSettings
AllowDragToGroup
=
"True"
AllowColumnsReorder
=
"True"
ReorderColumnsOnClient
=
"True"
>
<
Scrolling
AllowScroll
=
"True"
UseStaticHeaders
=
"True"
/>
</
ClientSettings
>
<
MasterTableView
CommandItemDisplay
=
"Top"
InsertItemDisplay
=
"Bottom"
TableLayout
=
"Fixed"
>
<
CommandItemSettings
ShowAddNewRecordButton
=
"False"
ShowExportToCsvButton
=
"False"
ShowExportToExcelButton
=
"true"
ShowRefreshButton
=
"False"
ShowExportToPdfButton
=
"True"
/>
<
RowIndicatorColumn
FilterControlAltText
=
"Filter RowIndicator column"
Visible
=
"True"
>
</
RowIndicatorColumn
>
<
ExpandCollapseColumn
FilterControlAltText
=
"Filter ExpandColumn column"
Visible
=
"True"
>
</
ExpandCollapseColumn
>
<
EditFormSettings
>
<
EditColumn
FilterControlAltText
=
"Filter EditCommandColumn column"
>
</
EditColumn
>
</
EditFormSettings
>
</
MasterTableView
>
<
FilterMenu
EnableImageSprites
=
"False"
>
</
FilterMenu
>
</
telerik:RadGrid
>
</
ContentTemplate
>
</
telerik:RadWindow
>
</
Windows
>
</
telerik:RadWindowManager
>
Protected
Sub
_btnUpdateResults_Click(sender
As
Object
, e
As
System.EventArgs)
Handles
_btnUpdateResults.Click
SetCriteria()
PopulateDateResults()
Dim
script
As
String
=
String
.Format(
"function ShowRadWindow() {{ $find("
"{0}"
").show(); Sys.Application.remove_load(ShowRadWindow); }} Sys.Application.add_load(ShowRadWindow);"
,
Me
.Window.ClientID)
RadScriptManager.RegisterStartupScript(Page, Page.[
GetType
](),
"ShowRadWindow"
, script,
True
)
End
Sub