on 08-15-2011 6:16 AM
Hi
Is it possible to use Central Management Console username in the crystal report?
I want to filter report parameters corresponding to the username
Thanks in advance
Hi,
Yes, it is possible to filter parameter values based on the currently logged in user.
Are you looking for something like this: For eg: If there are 2 CMC users A and B. When A logs in to run this particular report, this person should be presented with a list of values in the parameter associated with him/her.
It could be some IDs or any database field; for instance, A should only see IDs 1, 2, 3, 4 through 10 whereas B will only see 11, 12, 13, 14, through 20.
If this is what you're expecting then this can be worked out using the Business View Manager.
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If you want to apply a user based filtering in your report, then you can use CurrentCEUserID in business view manager.
Suppose you have a employee table, emp(empid, empname, sal, comm, deptno), now just add one more field to this table schema, which will return which records should be accessed by which user. emp(empid, empname, sal, comm, deptno, current user), here current user is used to assign the username to each record.
Follow the below mentioned steps to create a filter.
- Go to data foundation.
- Right click on u201CFiltersu201D and insert a new filter in it.
- On the right hand side pane you can see you tables, formulas, sql expression, etc. now choose the table field (current user). In the drop down select the condition (is equal to) and in the next drop down select the first option and click on apply button on the top to apply this filter on the record set.
Let me know if you have any queries.
Regards,
Kuldeep
Hi,
This might require some additions on the database side.
1) Create a new table called CMC_Users and add a few Business Objects user names to this table. You might want to create a column called User_ID which could be Primary Key for this table
2) Associate this Primary Key with other tables of the database so that have users aligned to their own data
2) Start Business View Manager. Assuming you're aware of this tool and the different levels (Data Connection, Data Foundation, Business Element, Businss View, List of Values) that come into picture, go ahead and create a filter at the 'Business Element' level. Here are the steps:
Make sure you've added the newly created CMC_Users table in the Data Foundation and Linked the other tables with this table.
- While on the Business Element, in the object browser you should see 'Filters'. Right click on it and insert a new filter.
- On the right hand side pane you would see you tables, formulas, sql expression, etc. Choose the User_Name field from the database and select the condition (is equal to) and in the next drop down select the first option and click on apply button on the top to apply this filter on the record set
Save the Business View and create the List of Values.
3) Now, the datasource for the report would be this Business View and not the database!
4) Open Crystal Report and click to create a new connection. Choose Repository as the connection type and then select the Business View that we just created
5) This Business View would contain all the fields you selected at the 'Business Element' level. Add the fields and run the report for the currently logged on user
Please let me know if this works.
-Abhilash Kumar
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.