Articles in this section
Category / Section

How to expand only the current position of a selected member in the OlapReport

1 min read

We can expand only the current position of a selected member by setting the DrillType property of the OlapReport set to DrillPosition.

Please refer the following code in that the highlighted line enables user to set DrillType to the OlapReport.

 

C#

 

 
 
  private OlapReport CreateOlapReport()
        {
            OlapReport olapReport = new OlapReport();
            olapReport.CurrentCubeName = "Adventure Works";
 
            DimensionElement dimensionElement = new DimensionElement() { Name = "Customer", HierarchyName = "Customer" };
            dimensionElement.AddLevel("Customer Geography", "Country");
            olapReport.SeriesElements.Add(dimensionElement);
 
 
            dimensionElement = new DimensionElement() { Name = "Geography", HierarchyName = "Geography" };
            dimensionElement.AddLevel("Geography", "Country");
            olapReport.SeriesElements.Add(dimensionElement);
 
 
            dimensionElement = new DimensionElement() { Name = "Date" };
            dimensionElement.AddLevel("Fiscal", "Fiscal Year");
            olapReport.CategoricalElements.Add(dimensionElement);
 
            olapReport.DrillType = DrillType.DrillPosition;
 
            return olapReport;
 
        }

 

 

Figure: OlapGrid with DrillType set to DrillPosition

 

 

 

 

 

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied