Hello
I have the following data structure:
Class1 has following properties: string1, string2, doule1, double2, class2.
Class2 has the following properties: string3, string4, double3, double4.
I create a FlatDataSource with the initial cube containing a List<Class1>. What I want, is to be able to expose double3 and double4 from class2 property of Class1 as measures. How can I do that??
FlatDataSource flatDataSource = new FlatDataSource() { ItemsSource = class1List, Cube = DataSourceBase.GenerateInitialCube("Class1"), Rows = DataSourceBase.GenerateInitialItems("[string1], [string2]"), Columns = DataSourceBase.GenerateInitialItems("[class2]"), Measures = DataSourceBase.GenerateInitialItems("double3") };
does not work. What am I doing wrong?
Many thanks
Kostas.
Thank you very much for the quick response. That is what I thought the answer is, but I wanted to confirm before I restructured my data.
Kind regards
Hi
to expose double3 and double4 from class2 property of Class1 as measures cannot be done directly. You can do this like in Class1 define two additional properties of type double double3Class2 and double4Class2. So constructing your FlatData you can set to this properties values from object class2.double3 and class2.double4. In this way Measures will be created from double3Class2 and double4Class2 which are in Class1.
I hope that this will help you.
Dimitrina