Search code examples
filtermicrostrategy

Microstrategy - How to apply a security filter just to certain report?


I need to apply a filter in some report for some users. I was told that the best way to do this is a security filter but i discovered that security filters are applied to all the reports that the user open.

I need some kind o filter that filter an attribute on a user but just on some reports, not all.

example:

if report1{

   if user1 then attribute = 1

   if user2 then attribute = 2
}

let's say i have departments and chiefs of those departments.

It is not a matter of security but a matter of comfort. I want to avoid the chief of a department to manually select (prompt) his department. It would be more comfortable if the system would recognize the user and show the data of his interest.


Solution

  • There a different ways to solve this kind of scenario, depending on the level of flexibility you want to offer to your user and the effort you need to implement and maintain the solution.

    The User Login way

    No flexibility, low maintenance, more effort to implement

    Use the User Login prompt. This is a system prompt (created by default MicroStrategy) that returns the user login. If you have a table with the data that a user can see like this:

    UserLogin YourAttribute
    user1     attribute1
    user2     attribute2
    user3     attribute3
    ...       ...
    

    You can create an attribute UserLogin to be parent of the Attribute you want to use as filter and then create a filter (User Login = User Login System prompt)that you will put in your report.

    More detailed information can be found here.

    Once implemented this solution will you need to maintain that new table and when the user run a report with that filter it will be able to see only his data. It's similar to a security filter, but now you can decide where to apply the filter.

    Multiple reports for multiple prompt defaults

    Flexibility, high maintenance, little effort to implement

    For each user create a copy of that report with the proper answer as default.

    Maybe you can create ten reports now, but if you need to modify that report tomorrow you will need to modify ten report or recreate again all copies with different prompt answers.

    Anyway this is good for the users, because they can change the prompt answers if they need.

    Using URL to answer prompts

    Flexibility, low maintenance, variable effort to implement

    Instead to run the report using MicroStrategy you can provide to each user a specific URL that, using MicroStrategy URLAPI, answer automatically the prompt.

    Of course you need to prepare the URLs in advance or find a way to do it programmatically. This is a good solution if the user don't want to navigate the MicroStrategy web interface but just run the report.

    Subscribe the prompt answers

    Flexibility, low maintenance, medium effort to implement

    Have the report with the proper prompt answer delivered to your user every morning (or when you want). Using MicroStrategy Distribution Services you can deliver a report or document to your user and for each user you can specify the correct prompt answers.

    No user can receive the full report in their mail box or just a link to their history link, opening that link they will see the report with their data. Of course users (or probably you) will need to setup all the subscriptions required.

    Final thoughts

    In these case I prefer to leave flexibility to users and teach them how to use the product. Of course there are some people they have no time for this kind of things (usually C something levels), in that case the best this is to have the data delivered to their email.

    I understand some of these options are not that straight forward to implement if you are new to MicroStrategy.

    My suggestion: for now go with the subscriptions (if you can) or teach your users how to save their own copy of that report (in My Reports) with the prompt already answered (oh, yes, this was another option, but each user has to do it), every time they will open it now, the prompt won't show up (but if you change the original report they will need to do it again).

    Let me know if you need more details.