We have changed our pricing. Flexmonster Software License Agreement was also updated (list of changes)

Help with hiding measure or dimensions in saved reports

Answered
Jesica asked on January 9, 2025

Hello team: we are using SASS datasource. We have implemented a backend service that returns to the frontend a list of fields that will be mapped with visible: false.

This works correctly. However, we have a gap where, if the user had already saved a json with the report, and the user had those measures of dimensions available at that time, we don't know how to hide them. They will still show up.

Can you please help us?

Thanks!

 

5 answers

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster January 10, 2025

Hi, Jesica!

Thank you for reaching out to us.

We would like to ask more questions about the use case before advising you further.

First, if the measure is configured as not visible from the code, the users can't configure it to be visible again from the UI. Our team is wondering how the users can have the measure visible in their saved reports. Do they modify the report.json file themselves? Or have the mapping configurations changed after some users saved the reports with the previous mapping? Any additional details about the use case would be of great help.

Also, we can recommend some configurations to prevent the described scenario from happening. Please let us know if such adjustments can still be made or if the users already have saved the reports with measures visible.

This information would help us greatly to continue the investigation.
Looking forward to hearing your response.

Kind regards,
Solomiia

 

Public
Jesica January 13, 2025

Hi Solomiia

The use case is: the mapping config changes after the users have saved the json report.

We have a backend service that returns access to measures and dimensions for the user, and that access can change in time.

The problem arises when the user had already saved the json and now shouldn't be seeing some of the dimensions or measures.

Thanks

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster 7 days ago

Hello, Jesica!

Thank you for getting back to us.

We can suggest several approaches for the described use case:

1) Use URL to JSON mapping file instead of defining the inline mapping object.
This way, all reports would be connected to the same mapping object, which you can easily update when necessary.

You can read more about this approach in our docs: https://www.flexmonster.com/doc/mapping/#mapping-via-url.

2) Move the dataSource configurations from the report object to the global object: https://www.flexmonster.com/doc/global-options/#global-data-source.
This way, the dataSource configurations won't be saved in the report.json fine and will be the same for all users.
You can check how it works on the following JSFiddle: https://jsfiddle.net/flexmonster/x29o1ejz/. Please note that the dataSource defined in the report still has higher priority than in the global.

3) You can also configure user roles on the cube so different users would have access to their specific measures.

Please let us know if the suggested approaches work well for your case.
Looking forward to hearing from you.

Kind regards,
Solomiia

 

Public
Jesica 7 days ago

Hi Solomiia: thanks for the answer

I don't quite understand how approach 1) or 2) would work.

This is the complete use case. We offer 2 products (X and Y) with different measures and dimensions :

User 1 has product X and he sees 3 measures.

User 2 has product Y and he sees 5 measures.

 

User 2 saves a json with a report with his 5 measures.

Now, user 2 has product X. So now he must see 3 measures.

However, if user 2 opens the json report, he still sees 5 measures, because he had saved the file when he had product X.

 

Thanks!

 

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster 6 days ago

Hello, Jesica!

Thank you for your quick reply and for a more detailed description of your use case.

As we understand, in your use case, one user can have two different access levels, depending on the product, and the reports can be shared between these products.

It is hard for us to provide you with any specific solution for such a use case, as it depends greatly on your project architecture.
However, we can share with you some thoughts that we hope will be helpful.

When it comes to data access control, such logic would need to be applied on a higher level, before the report is loaded back into Flexmonster, as the report doesn't have any information about the product it is used in. For example, it is possible to customize the Toolbar tabs in Flexmonster to insert your custom logic for loading local reports. This way, you can pre-process any report before Flexmonster loads it. However, it is difficult to control data access perfectly from the client side, as it has a more transparent structure, and all the restricting logic would be visible.

For us, it seems that the most smooth and elegant solution can be achieved by configuring access levels for your users on the server side (on the cube), instead of hiding fields via mapping. Two possible approaches that Flexmonster supports are using roles from Analysis Services and using Windows authentication.

Hope you will find our answer helpful.
Feel free to ask if there are any further questions.

Kind regards,
Solomiia

 

Please login or Register to Submit Answer