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
close icon

How to limit the dimension in Cube Dimension Browser

Hi Syncfusion Team,

I have an issue related to OLAP Client report.
My question is can be limit the dimensions to show only selected dimensions in "Cube Dimension Browser" from cube.
So whenever we run the report then on the left side in the Cube Dimension Browser we get all the dimensions available in cube and we can drag and drop dimensions accordingly.
Suppose we have 20 dimensions in the cube but we want to display only some (lets say 15 dimensions ) in the Cube Dimension Browser not the all.
So can we do that? If yes then how to do that, could you please explain the process?

It would be really helpful if you provide some piece of code for the same.
I'll wait for your response.
Thanks
Shreekant


17 Replies

SJ Shreekant Jadon October 12, 2015 07:54 AM UTC

Hi Sync fusion,

Can someone please reply to my question below?
I raised the ticket 4 days back on October 8th, 2015 but nobody replied.

Since this issue is very critical for us so can someone have a look and reply back.

Waiting for your reply.

Thanks
Shreekant


AD Alagarsamy D Syncfusion Team October 12, 2015 09:07 AM UTC

Hi Shreekant,       

Sorry for the delay.

Kindly refer the below code snippet to  meet your requirement.

Code Snippet: [C#]

void OlapClient1_PreRender(object sender, EventArgs e)

        {

            TreeNodeCollection tree = this.OlapClient1.CubeDimensionBrowser.Nodes[0].ChildNodes;

            for (int i = tree.Count - 1; i >= 0; i--)

            {

                if (tree[i].Text != "Customer" || tree[i].Text != "Employee")

                    tree.RemoveAt(i);

            }

        }

Here in the above example, the “!=” symbol will skip the Dimensions under the name “Customer” & “Employee” and hides the rest.

Please let us know if you have any concerns on this.

Regards,

Alagarsamy D



SJ Shreekant Jadon October 12, 2015 09:34 AM UTC

Thanks Alagarsamy,

I hope this will work,

It would be good if you provides some links for the sample demo for the same, if you have already implemented this.  
Thanks once again for all your help.

Regards,
Shreekant


AD Alagarsamy D Syncfusion Team October 12, 2015 09:51 AM UTC

Hi Shreekant,

Thanks for the update.

Please find the sample in the below link based on your requirement.

Sample Link:
https://www.syncfusion.com/downloads/support/forum/120750/ze/OlapClient89997364

Please let us know if you have any concerns.

Regards,
Alagarsamy D.


SJ Shreekant Jadon October 12, 2015 11:10 AM UTC

Hi Alagarsamy,

Thanks for quick response.

This demo contained same piece of code that you sent that is fine
Actually I was looking for the online sample demo on your portal (path for online sample demo on sync fusion site) so I can play around that.

Thanks
Shreekant


RG Ramesh Govindaraj Syncfusion Team October 13, 2015 12:32 PM UTC

Hi Shreekant,

The demo for the requested sample is not available directly in our online sample browser. So we have hosted a sample in a separate server. Please find the online link below.

http://staging.syncfusion.com:8123/SampleOlapClient/OlapClient.aspx
 
Regards,
Ramesh G.


SJ Shreekant Jadon October 19, 2015 07:46 PM UTC

Thank you very much Ramesh,

I have been used the code provided by you and it is working as expected so this ticket can be closed now.

Thanks all for your help on this.

Thanks
Shreekant


RG Ramesh Govindaraj Syncfusion Team October 20, 2015 12:06 PM UTC

Hi Shreekant,

Thanks for the update.


Please let us know if you have any query.


Regards,

Ramesh G.



SJ Shreekant Jadon October 21, 2015 08:38 AM UTC

Hi Ramesh,

I have one more issue related to dimension hierarchy.

I have a dimension dimPlacementDate that contain the two hierarchies named 1. dimPlacementDate 2. Placement Date.
first hierarchy functioning correctly means when we use that on grid it populate the year like "2000",2001.. and so on.
But the second one do not populate the data in year format it return data in date like "2000-01-01" ans so on.

Actually inside each hierarchy we have attribute "year"-"Quarter"-"month"-"Day"- "Placement Date"
so first one returning data from "year" attribute and second one returning data from "Placement Date" Attribute. but it shout select "year" attribute.

I checked the implementation and compare the property for both the hierarchy but didn't see any difference.

So could you please tell me, is there any setting or any property where we can set which attribute to select? or what is exact functionality how the data come out from hierarchy by default.

am using below code to add the hierarchy

DimensionElement dimensionElementColumn = new DimensionElement();
        // Specifying the name of the dimension element
        dimensionElementColumn.Name = "dimPlacementDate";
        // Specifying the hierarchy and level name
        dimensionElementColumn.AddLevel("Placement Date", "Year");

but still it is returning "Placement Date" Attribute not the "year" attribute.
It would be really helpful if you can check and provide some input how to manage to select year attribute.

I'll be waiting for your response

Thanks
Shreekant


RG Ramesh Govindaraj Syncfusion Team October 22, 2015 08:53 AM UTC

Hi Shreekant,

Could you please provide us a detailed screen-shot about the reported dimension. We would like to view the dimension in a fully expanded state like in the below screen-shot. This will help us to proceed further.

                                              

Regards,

Ramesh G.



SJ Shreekant Jadon October 22, 2015 07:38 PM UTC

Hi Ramesh, 

Thanks for your reply.

Right now am not able to get the screenshot for the full expanded tree structure so I will provide you that soon and discuss the issue then.

For now I have one more question. 
Please check attached screenshot image for an Element Editor Window for Date Dimension. In this image  you can see the bank year field that is coming from database and we are using that for other reports but not for sync fusion reports and this blank field creating issue for sync fusion reports.

Now I want to disable that blank field any how for ever. So is there any property for the Element Editor Window Element fields so we can disable them?

Which is the event that got fired when we click the Element Editor Window and its check boxes?

It will be really helpful if you provide some event and some piece of code to handle the check boxes of Element Editor Window.

I'll wait for your reply.

Thanks
Shreekant

Attachment: Element_Editor_Window_7b18c7cb.zip


SJ Shreekant Jadon October 22, 2015 07:44 PM UTC

Hi Ramesh,

I want to add some more thing....

Now I want to restrict the user from selecting that blank field. For now we can select and deselect the any check box. 

Thanks for all your help as always.

Thanks
Shreekant



SJ Shreekant Jadon October 23, 2015 11:15 AM UTC

Hi Ramesh and Sync fusion team,

Any update on above.
This is bit critical for us so if can check this on priority that would be good for us.

Thanks
Shreekant


RG Ramesh Govindaraj Syncfusion Team October 23, 2015 12:02 PM UTC

Hi Shreekant,

Please find our response below.

S.No
Query
Response
1.
Now I want to restrict the user from selecting that blank field.
Now I want to disable that blank field anyhow forever. So is there any property for the Element Editor Window Element fields so we can disable them?
We have prepared a sample where we can hide the desired member inside Member Editor. Please find the sample in the following link.

Sample Link: http://www.syncfusion.com/downloads/support/directtrac/145744/ze/Olapclient_snapdate_(2)-781093777

NOTE: We are using Microsoft TreeView control and it doesn’t have option to disable any child node. Hence we have hidden "(blank)" inside the Member Editor.

2.
Which is the event that got fired when we click the Element Editor Window and its check boxes?
It will be really helpful if you provide some event and some piece of code to handle the check boxes of Element Editor Window.

We have two events w.r.t Member Editor which arises when we open the Member Editor and when we click "OK" button in the Member Editor. While clicking "OK" button, its respective event will be raised where you can view the checked state of the node via the argument " EditorOkBtnClicked".

Please utilize the above sample where the events related to the Element Editor are added for your convenience.


Regards,
Ramesh G.


SJ Shreekant Jadon October 23, 2015 01:29 PM UTC

Hi Ramesh,

Thanks for your reply.

I tried to use both the events provided by we don't have either of the event available in version 11.1.0.21. So in which version we can find those events?
Do we have any related event for the version 11.1.0.21?

We are trying to upgrade it to version 13.3.0.7 but it might take some time, for now we are using v 11.1.0.21.
It would be really helpful if you provide some input on how to handle this Element Editor check box issue in v 11.1.0.21.

Thanks for all your help as always.

Thanks
Shreekant


SJ Shreekant Jadon October 26, 2015 07:26 AM UTC

Hi Ramesh,

Could you please reply to my question above?

Thanks
Shreekant 


RG Ramesh Govindaraj Syncfusion Team October 26, 2015 10:58 AM UTC

Hi Shreekant,

We had created a new incident under the incident id(146091). Please follow-up with that incident for further assistance.


Direct Trac Log-In Link:   https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents  

 

Regards,

Ramesh G.


Loader.
Live Chat Icon For mobile
Up arrow icon