locked
Mandatory Filter in Report Model RRS feed

  • Question

  • Hi,

    I have created a DataSourceView with 5 Entities. I want to set a specific attribute's as mandatory filters for each entities . so when the user run report using this model in report builder they will be prompt to enter value for each of the attributes(specified in the filter)

     

    Currently i created a filter for a attribute(say customerno) and added this filter as securityfilter for a entitiy

     

    When i run the report using report builder / model without any filter , it prompts me to enter a filter which is GOOD

    but when i apply filter with any attributes, the report start processing. I assume until i apply the filter for "Customerno" it shouldnt process further

     

    Am i missing something?

     

    What i want is to restrict user from running a report until a filter is applied with the filter attributes specified in the model

     

    Any help/sugesstion  much  appreciated

     

    Thanks

     

    Wednesday, November 12, 2008 12:45 AM

Answers

  • Security filters cover the scenario where specific users can only view certain data for the entity. For instance, do you want to limit a specific user (say, UserA) to only view data with a specific customerno (say CustomerNo=1)? If you do this, UserA will only ever see data for CustomerNo=1; they cannot see any of the other data. If this is what you want, you can use security filters to accomplish this. There are some additional steps that may be required to enable security filters; more info here: http://msdn.microsoft.com/en-us/library/ms365305.aspx and a useful blog posting here: http://blogs.msdn.com/bobmeyers/articles/Implementing_Data_Security_in_a_Report_Model.aspx.

     

    If you want your users to be able to view all the data, but would like them to filter it (to avoid returning 1M rows for instance), you can use the InstanceSelection : MandatoryFilter setting on your entity. This requires that the users specify a filter, but does not require them to filter on a specific attribute.

    Wednesday, November 12, 2008 2:16 AM
  • The MandatoryFilter setting is applied based on the base entity of the report--the entity displayed at the top of the Entities navigation tree in Report Builder.  You may want to confirm that you are setting MandatoryFilter for the entity used as the base entity in the report.

    You mentioned Report Designer though: do you mean Report Designer in Visual Studio? I'm not sure if we respect the MandatoryFilter setting in VS Report Designer.  We expect end-users to use Report Builder as their report authoring tool.

     

    Correct, DSV does not support stored procs Sad

     

    Wednesday, November 19, 2008 2:27 AM

All replies

  • Security filters cover the scenario where specific users can only view certain data for the entity. For instance, do you want to limit a specific user (say, UserA) to only view data with a specific customerno (say CustomerNo=1)? If you do this, UserA will only ever see data for CustomerNo=1; they cannot see any of the other data. If this is what you want, you can use security filters to accomplish this. There are some additional steps that may be required to enable security filters; more info here: http://msdn.microsoft.com/en-us/library/ms365305.aspx and a useful blog posting here: http://blogs.msdn.com/bobmeyers/articles/Implementing_Data_Security_in_a_Report_Model.aspx.

     

    If you want your users to be able to view all the data, but would like them to filter it (to avoid returning 1M rows for instance), you can use the InstanceSelection : MandatoryFilter setting on your entity. This requires that the users specify a filter, but does not require them to filter on a specific attribute.

    Wednesday, November 12, 2008 2:16 AM
  • Thanks Aaron

    You are right, i dont want the user to mistakenly run a report against our warehouse DB.

    I did set a MandatoryFilter for entity and value selection:none , but it doesnt prompt for any filter while running the report in report designer

     

    Is there any thing i can do in the named query which enables a filter prompt on certain attributes while runing the report?

     

    I guess its not possible to use stored proc in DSV

     

    thanks

     

     

     

    Wednesday, November 12, 2008 4:07 AM
  • The MandatoryFilter setting is applied based on the base entity of the report--the entity displayed at the top of the Entities navigation tree in Report Builder.  You may want to confirm that you are setting MandatoryFilter for the entity used as the base entity in the report.

    You mentioned Report Designer though: do you mean Report Designer in Visual Studio? I'm not sure if we respect the MandatoryFilter setting in VS Report Designer.  We expect end-users to use Report Builder as their report authoring tool.

     

    Correct, DSV does not support stored procs Sad

     

    Wednesday, November 19, 2008 2:27 AM