We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to include Member Properties on an OlapClient report

In my cube I have many member properties on my dimensions. How can my users include these values on a report built using the OlapClient?

3 Replies

TB Thirupathi Bala Krishnan Syncfusion Team November 30, 2018 09:17 AM UTC

Hi Raymond,   
  
We have checked your requirement “How to include Member Properties on an OlapClient report”. You can include the member properties in your olap report bound to OlapClient controls. To view the member properties in your control, you need to set the grid layout as “ExcelLikeLayoutWithMemberProperties”.    
  
Please refer to the below code sample:   
  
#ViewModel.cs   
  
        private OlapReport ReportWithMemberProperties()   
        {   
            OlapReport olapReport = new OlapReport();   
            // Specifying the current cube name   
            olapReport.CurrentCubeName = "Adventure Works";   
  
            MeasureElements measureElementColumn = new MeasureElements();   
            // Specifying the Name for the Measure Element   
            measureElementColumn.Elements.Add(new MeasureElement { Name = "Sales Amount Quota" });   
  
            DimensionElement dimensionElementRow = new DimensionElement();   
            // Specifying the Dimension Name   
            dimensionElementRow.Name = "Employee";   
            // Specifying the Hierarchy and level name for the Dimension Element   
            dimensionElementRow.AddLevel("Employees", "Employee Level 02");   
            dimensionElementRow.Hierarchy.LevelElements["Employee Level 02"].IncludeAvailableMembers = true;   
  
            // Adding the Member properties to the Dimension Element   
            dimensionElementRow.MemberProperties.Add(new MemberProperty("Title", "[Employee].[Employees].[Title]"));   
            dimensionElementRow.MemberProperties.Add(new MemberProperty("Phone", "[Employee].[Employees].[Phone]"));   
            dimensionElementRow.MemberProperties.Add(new MemberProperty("Email Address", "[Employee].[Employees].[Email Address]"));   
  
            // Adding Row Members   
            olapReport.SeriesElements.Add(dimensionElementRow);   
  
            //Adding Column Members   
            olapReport.CategoricalElements.Add(measureElementColumn);   
  
            return olapReport;   
        }   
  
#MainWindow.xaml.cs   
   
        public MainWindow()   
        {   
                InitializeComponent();   
                olapClient1.Loaded += OlapClient1_Loaded;   
        }   
  
        private void OlapClient1_Loaded(object sender, RoutedEventArgs e)   
        {   
            olapClient1.OlapGrid.Loaded += OlapGrid_Loaded;   
        }   
  
        private void OlapGrid_Loaded(object sender, RoutedEventArgs e)   
        {   
                olapClient1.OlapGrid.Layout = GridLayout.ExcelLikeLayoutWithMemberProperties;   
        }   
   
   
  
Please find our working sample from the following location:   
  
Also, please refer to our UG documentation from the below link:   
  
NOTE: We don’t have any UI option to dynamically add the member properties in the OlapClient control.   
  
Please let us know if you need any further assistance.   
  
Regards,   
Thirupathi B.   
 



RD Raymond de Bourbon December 1, 2018 05:28 PM UTC

"NOTE: We don’t have any UI option to dynamically add the member properties in the OlapClient control."

Unfortunately, this is exactly the functionality I was looking for. My users need to be able to dynamically add member properties to their reports. 

Any suggestions/ideas for a workaround?

Thanks
Ray


TB Thirupathi Bala Krishnan Syncfusion Team December 3, 2018 07:01 AM UTC

 Hi Raymond,   
  
We have analyzed your requirement “How to add the member properties via UI in OlapClient control” and added it to our feature request list. It will be available in any of our upcoming releases.  
  
Regards,   
Thirupathi B. 
 


Loader.
Live Chat Icon For mobile
Up arrow icon