Is there a way to pass parameters into the Report Builder so that the available fields of an entity can vary depending on a parameter value (for instance, a group or user id)?
We have a situation where each group of users can have a variable set of custom properties to report on and we'd like to let them access these custom properties through the Report Builder. Any suggestions on how to go about it?
Thanks.
This is done thru model item security.
You can define access permissions to model items (entities, attributes, etc) based on user identity. You then create a report that includes an entity and all of its attributes.
When user A runs this report he will only see values of attributes he has access to, otherwise nulls
Is there a way to pass parameters into the Report Builder so that the resulting data set can vary depending on a parameter value (for instance, a vendor id)?
From what I understand, a report model can only use data from tables or views. We have multiple vendors on our database. When they log into reporting services, we need to be able to pull up their data, and their data only (filtered by vendor)
So far, the only way for us to do this, is to have a separate view for each vendor. Which is a pain/nightmare. Any help?
|||Yes, you need to create a filter and specify prompt in the filter dialog|||When I try to add a filter, the "Specify Prompt" feature is not available- all I see is "Edit As Formula", and "Remove Condition". Any suggestion why this is the case?
In addition, I do not want the end user to be able to change the filter- I want it to be applied automatically.
Is that possible as well?
|||You want to use security filters in your model. You need to modify your model in model desginer to add security filters.
|||I have found other threads mentioning security filters, and the "GetUserID" function-
But I still do not understand how to make use of it- is there an example you know of?
Do I need to add a filter to my model, or can I use an existing field and change that into a filter- and if I do make it a filter, how does it actually work at run time?
How do I incorporate the "GetUserID" with the user that logs in? It is not clear how these items work with one another.
|||I have come up with a solution to this problem that will suffice for the time being.
I am creating a report model for each entitty (group) that needs a separate model.
We have about 200 entities and growing, and not wanting to have to manually code each model individually, I created an application that will automatically generate my distinct models using find and replace. Each model also references the same set of database views. I simply query the view and filter out the data using the data source view (dsv) (using named queries) for each entity. My .dsv files are also automatically generated via my app. This way, I can create a base report model and a base data source view, and then I can just generate multiple copies of my base objects and deploy. All my objects remain in synch and making modifications to my large number of models is easy- just modify my base objects, re-generate and deploy.
I am giving each report model security so that only the entity logging in can see their specific model. (this has to be set manually, but that is ok because it only has to be configured once- if I re-deploy, the security settings are retained)
If anybody has any questions on my solution, let me know. Let me know if this is a viable solution for your business as well.
This is as close as I can get to having a "dynamic" ad-hoc reporting solution.
|||I am searching for this kind of solution only
Can you please tell me how to generate models programmatically?
We have different state level users in our application, and one state user should not see another state user's data. Is there any way to pass the statecode (we can pass GetUserID() but how to pass other fields) as parameter or any other way to solve this problem?
|||I have almost a solution, i think there is one issue with it, but maybe that's because of working in a citrix environment.
I used the securityfilters functionality. Here are the global steps to do it.
1. Create a new entity displaying the user ID's and the 'customer' (data) they have access to
2. Create a filter (in this new entity) displaying only the records of the current user. In my case the formula is: userid = upper ( RIGHT( GetUserID(),5)). Because the userid's always have five positions and in front of the userid the domain name is displayed, so I only want to compare the last five characters to the userid field in the database.
3. Set the property securityfilter of the new entity to the newly created filter
4. Link the entities in the datasourceview based on the company/customername to this new entity, so that every entity will be filtered based on this criteria. For example each customer record in our application has a dataareaid which i have to link to the new entity.
5. On the created link you have to apply the filter again. (so on the customer entity, you have to select the new role and then apply the securityfilter again.
The result here is that the reportbuilder will only display the customers that I'm allowed to see. I hope you get the idea. I personally think this is the proper way to do this, since maintaining multiple reportmodels is not what you want.
Bye,
Julian
|||I certainly think you are on to something there-Can you be a little bit more specific in terms of the steps you are doing to accomplish this?
I know you summed up your steps- but it would make it easier if you made the steps more explicit- i.e., give a sample naming of the entities and where you set the right properties. The report model designer is a bit different in terms describing what you are actually modifying.
BTW, the way I dynamically created my reports, was I used an SSIS package that takes in parameters and creates a copy of my .dsv file and my .smdl file using a small application called ssed that can do a find/replace via command line.|||
In my project, i have many users with different roles, each role is called 'level'. One level user cannot access the other level user's data/report.
Actually what i need is:
1. How do i let only few users (role id like 1, 2,3.... from db) to access the report builder through application.
2. How do i let only few users to access the datasource via report builder, i dont want all the data sources to be displayed for all users logging throu my application. also here 'users' means not the logging users of SSRS...but users logging in my application. For eg. If the logged in user has role id 3, then he can access only certain reports/datasources, he cannot access another user's (say role id 2) reports/datasource. .. ..
How do i achieve this?
Can you pls help me.
Thanks in advance
|||hi
i think that you should use reportviewer control within asp.net or c# and use the reporting services to render the report and don't emmbed parameters within the report try to validate a parameter withing your own application and just send a datatable to the report viewer and render it
if any one have idea about how to make within asp.net a wizard for creating dynamic report throgh the reporting services using report viewer control
i need to do that for a new forex articles website
http://www.123writers.com
and also for http://www.ybizz.com
any idea ?
|||I FINALLY got it to work exactly the way I want it to! I am totally stoked- allow me to describe as best as possible how I was able to acheive the functionality I was looking for:Step 1: Implement UFAIRS (Using Forms Authentication in Reporting Services) seen here: Step 2: Our Forms Authentication has an identifier that lets us know what "group" the user logging in is as. So for example, if I login as "user@.group1", then I can parse out "group1" from the login name- this comes into play for my dynamic filtering. Step 7: Create an entity (EntityA) in the report model and bind it to a table/view that contains the field we want to filter by. After that, go give it a whirl and see if it worked! It totally works for me! Let me know what you think!
http://msdn2.microsoft.com/en-us/library
Step 3: Create a Data Source to connect to the database.
Step 4: Create a Data Source View, with whatever tables/views you need.
Step 5: Make sure the data source view contains a table/view with a field that matches the "group" that you want to filter by (i.e., group1 from above)
Step 6: Create a report model.
Step 8: Add whatever source fields you want in (EntityA).
Step 9: Add an additional source field (FieldB) in (EntityA) that is bound to the field that contains our filter value = group1.
Step 10: I like to make (FieldB) hidden because this is only being used as my filter criteria.
Step 11: Add a new filter (FilterC) to (EntityA).
Step 12: Highlight (FilterC) and go to Properties->Filter.
Step 13: Click the edit (ellipses) button on the "Filter" Property to edit the [Expression].
Step 14: Drag in (FieldB) from the Fields List to use as a filter, into the center window.
Step 15: Right click on (FieldB) in the center window and select "Edit Formula"
Step 16: Make the formula say something like- "FieldB = SUBSTRING(GETUSERID(), FIND(GETUSERID(), "@.")+1,LENGTH(GETUSERID()))"
What I am doing here is parsing out the word "group1" from the username, and setting it equal to (FieldB).
Let me know if this does not make sense.
Step 17: Hit ok to close the "Define Formula" window, then hit ok again to close the "Filter Data" window.
Step 18: I also like to make (FilterC) hidden so that users cannot see or use this field.
Step 19: Highlight (EntityA), and go to Properties->DefaultSecurityFilter.
Step 20: Click the ellipses to bring up the "Default Security Filter Attribute" window.
Step 21: Highlight (FilterC) and click ok to close the Default Security Filter Attribute window.
Step 22: Build the project, and deploy!
No comments:
Post a Comment