Olap Grid doesn''t display anthing

I'm using a userControl to display a olapGrid in a WinForm. I get no errors, but the grid is completely blank when i run it.


public UserControl1()
{
InitializeComponent();
OlapDataManager odm = new OlapDataManager(connectionstring);

var olrep = new OlapReport();
olrep.CurrentCubeName = cubename;

//Creating Dimension elements to add in Categorical axis
DimensionElement dimensionElementColumn = new DimensionElement();

dimensionElementColumn.HierarchyName = "RPT TIME";
dimensionElementColumn.AddLevel("RPT TIME", "YEAR");
dimensionElementColumn.Name = "YEAR";
//Creating Measure Elements
MeasureElements measureElementColumn = new MeasureElements();
measureElementColumn.Elements.Add(new MeasureElement { Name = "PREMIUM" });

//Creating Dimension elements to add in Series axis
DimensionElement dimensionElementRow = new DimensionElement();
dimensionElementRow.HierarchyName = "GARE CAGS";
dimensionElementRow.AddLevel("GARE CAGS", "CAGS");
dimensionElementRow.Name = "CAGS";
olrep.CategoricalElements.Add(new Item { ElementValue = dimensionElementColumn });

//Adding Measure Element
olrep.CategoricalElements.Add(new Item { ElementValue = measureElementColumn });

//Adding Row Members
olrep.SeriesElements.Add(new Item { ElementValue = dimensionElementRow });

odm.SetCurrentReport(olrep);
olapGrid1.OlapDataManager = odm;
olapGrid1.DataBind();

}

1 Reply

RS Ryan Schroeder July 27, 2010 06:37 PM UTC

Fixed this problem... I had to inherit from SampleWindow instead of Window.



Loader.
Up arrow icon