Connection to RadPivotGrid

7 posts, 0 answers
  1. Kalyani
    Kalyani avatar
    20 posts
    Member since:
    Jul 2011

    Posted 10 Mar 2014 Link to this post

    I am trying to connect to a cube using C#.    When I connect it through my aspx page it works without any issues.  But I would like to do it using code. I tried this code - but I am not able to do it.   Please let me know what I should fix..

     This is my aspx page 

     <tlrk:RadPivotGrid AllowFiltering="true" AllowSorting="true" ID="RadPivotGrid1"  Width="100%" 
           RowTableLayout="Tabular" FieldsPopupSettings-AggregateFieldsMinCount="2" AllowPaging="true"
           PageSize="20" runat="server" EnableConfigurationPanel="true" EnableZoneContextMenu="true"
           AggregatesPosition="Rows"  EnableToolTips ="true" Skin="Vista">
        <PagerStyle AlwaysVisible="true" />
        <OlapSettings ProviderType="Adomd"> </OlapSettings>      
        <RowHeaderCellStyle Width="100%" />
        <ConfigurationPanelSettings Position="left" LayoutType="Stacked" DefaultDeferedLayoutUpdate="true"  />
        <ClientSettings EnableFieldsDragDrop="true"><Scrolling AllowVerticalScroll="false" ScrollHeight="1000px" /> </ClientSettings>
       </tlrk:RadPivotGrid>

    And in my c# I did this  - 

    protected void Page_Load(object sender, System.EventArgs e)
     {
       SetupAdomdConnection();
     }
    private void SetupAdomdConnection()
     {
      AdomdDataProvider provider = new AdomdDataProvider();
      AdomdConnectionSettings settings = new AdomdConnectionSettings();
      settings.Cube = "cubeName";
      settings.Database = "DBName";
      settings.ConnectionString = "Provider=MSOLAP;Data Source=XXXXX;Initial Catalog=DBName;";
      provider.ConnectionSettings = settings;
     }




  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 13 Mar 2014 Link to this post

    Hello Kalyani,

    Note that setting the OLAP settings programmatically should be preformed in Page_Init event and also should be applied to RadPivotGrid1.OlapSettings.AdomdConnectionSettings for example:
    protected void Page_Init(object sender, EventArgs e)
    {
        RadPivotGrid1.OlapSettings.AdomdConnectionSettings.Cube = "cubeName";
        RadPivotGrid1.OlapSettings.AdomdConnectionSettings.DataBase = "DBName";
        RadPivotGrid1.OlapSettings.AdomdConnectionSettings.ConnectionString = "Provider=MSOLAP;Data Source=XXXXX;Initial Catalog=DBName;";
            
    }

    I hope this helps.

    Regards,
    Maria Ilieva
    Telerik
     

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kalyani
    Kalyani avatar
    20 posts
    Member since:
    Jul 2011

    Posted 13 Mar 2014 in reply to Maria Ilieva Link to this post

    Thanks.. Was able to get it to work..
  5. Diyan
    Diyan avatar
    10 posts
    Member since:
    Oct 2012

    Posted 27 Aug 2014 Link to this post

    Hi
    I will use this thread because it is similar to my problem.
    My scenario is that I need to use specific user for connection.
    According to this links http://www.telerik.com/help/aspnet-ajax/pivotgrid-olap-support.html and http://demos.telerik.com/aspnet-ajax/pivotgrid/examples/olap/defaultcs.aspx there is a property Credentials but I can't find in. 

    This is my example 
    RadPivotGrid1.OlapSettings.AdomdConnectionSettings.ConnectionString = ConfigurationManager.AppSettings["BIConnectionString"];
    RadPivotGrid1.OlapSettings.AdomdConnectionSettings.Cube = ConfigurationManager.AppSettings["BICube"];
    RadPivotGrid1.OlapSettings.AdomdConnectionSettings.DataBase = ConfigurationManager.AppSettings["BIDataBase"];
    Thanks


  6. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 28 Aug 2014 Link to this post

    Hi Diyan,

    The credentials could be set in case the ConnectionString is in the following format:

    ConnectionString="Provider=MSOLAP.5;Data Source=ServerName;Initial Catalog=Adventure Works DW 2008R2;User Id=domain\user;Password=myPassword;">

    I hope this helps.

    Regards,
    Maria Ilieva
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  7. Diyan
    Diyan avatar
    10 posts
    Member since:
    Oct 2012

    Posted 01 Sep 2014 in reply to Maria Ilieva Link to this post

    Hi Maria,
    Unfortunately this doesn't work. What I try to achieve is to use Adomd as olapsetting provider (RadPivotGrid1.OlapSettings.ProviderType = PivotGridOlapProviderType.Adomd) and keep ApplicationPoolIdentity as identity of my application pool. Also I forgot to mention that analytics server is on different machine but in same domain. 

    So my goal is with adomd provider running on build-in applicationpoolidentity connect to this analytics server using some specific domain account.
    Thanks
  8. Kostadin
    Admin
    Kostadin avatar
    1711 posts

    Posted 03 Sep 2014 Link to this post

    Hello Diyan,

    I am afraid you could not use the ApplicationPoolIdentity to login to the cube. Generally you could use the identity to prevent opening a web page or load a different data in the cube, but you could not use it to connect to the OLAP data source. For this purpose you need to use the id and the password of the cube as Maria's suggestion.

    Regards,
    Kostadin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017