Pre filtering OLAP data

2 posts, 0 answers
  1. Richard
    Richard avatar
    2 posts
    Member since:
    Jun 2013

    Posted 11 May 2015 Link to this post

    Hi 

    We have an OLAP cube we want to view with the PivotGrid in an ASP.NET website. 

    We need to allow different users only to view their own data from the cube with some kind of pre-filter or sub query.  

    Any help to achieve this would be appreciated.

    Thanks in advance

    Richard

  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 14 May 2015 Link to this post

    Hi,

    Possible approach in your case is to apply initial filter by using the FilterByLabel and FilterByValue methods of the RadPivotGrid in the PreRender event.

    For example:

    FilterBylabel:

    protected override void OnPreRender(EventArgs e)
    {
        base.OnPreRender(e);
        RadPivotGrid1.FilterByLabel(PivotGridFilterFunction.Contains, RadPivotGrid1.Fields["Cost"], "filter value");
    }

    protected override void OnPreRender(EventArgs e)
    {
        base.OnPreRender(e);
        RadPivotGrid1.FilterByLabel(PivotGridFilterFunction.IsNotBetween, RadPivotGrid1.Fields["Cost"], "filter value", "beetween filter value");
    }

    FilterByValue:

    protected override void OnPreRender(EventArgs e)
    {
        base.OnPreRender(e);
        RadPivotGrid1.FilterByValue(PivotGridFilterFunction.BeginsWith,
            RadPivotGrid1.Fields["Line"],
            RadPivotGrid1.Fields["Total"] as PivotGridAggregateField,
            "filter value");
    }

    protected override void OnPreRender(EventArgs e)
    {
        base.OnPreRender(e);
        RadPivotGrid1.FilterByValue(PivotGridFilterFunction.IsBetween,
            RadPivotGrid1.Fields["Line"],
            RadPivotGrid1.Fields["Total"] as PivotGridAggregateField,
            "filter value",
            "between filter value");
    }



    Regards,
    Maria Ilieva
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top