When I run:
FlatDataSource flatDataSource = new FlatDataSource(); flatDataSource.Cube = FlatDataSource.GenerateInitialCube(list.AsQueryable().ElementType.Name); CubeMetadata cubeMetadata = new CubeMetadata(); cubeMetadata.DisplayName = "Sales Data"; cubeMetadata.DataTypeFullName = list.AsQueryable().ElementType.FullName; cubeMetadata.DimensionSettings.Add(new DimensionMetadata() { SourcePropertyName = "Total_Per_Student_Amount", DisplayName = "Total Amount Per Student", DisplayFormat = "{0:C2}" }); cubeMetadata.DimensionSettings.Add(new DimensionMetadata() { SourcePropertyName = "Total_Expense_Amount", DisplayName = "Total Expense Amount", DisplayFormat = "{0:C2}" }); flatDataSource.CubesSettings.Add(cubeMetadata);
I keep getting "Object reference not set to an instance of an object. It says that I need to use the "new" keyword. However, I have assigned new to both the flatDataSource object and the cubeMetadata object.
What am I doing wrong?
Hi,
Do you have any hierarchy descriptors attached?
Plamen.
I do not know what you mean. What are these?