1

I Want to create a report using SQL Server Reporting Services. In Visual Studio I created a report to get SharePoint data from a list.

I want to get the current logged in user in SharePoint and check the user permission based on that permission I need to show the data in report. For that how can I write the query in query designer?

I have a user profile area list in that area name should be approved he able to create new contract using that area name.

This is Robert Login he able to see only General, HR, Legal. In above image in user profile area list finance is Denied for robert.

This is George login he able to see only General, HR, Legal, and Finance.

How can I write the query in Query Designer?

I was logged in Robert but in Report it was showing all Contract Areas.

1 Answer 1

0

at Dataset Properties > Go to filters > select the build in field as user ID to get the current login user.

enter image description here

11
  • Hi,I tried this but this is Won't Work in report all the areas are came in above i added a image
    – Elina
    Jul 27, 2016 at 12:59
  • Hi Qassas did you see that Report image, in that Contract Area dropdown i want to filter the areas if i logged in Robert in dropdown General,HR,Legal should come.If i logged in George in dropdown General,HR,Legal,Finace should come.How can I achieve this ?
    – Elina
    Jul 27, 2016 at 13:04
  • Are you tried to update dataset of contract area access (that fill the drop-down list ) by adding the contract area field then filter username with user ID. Jul 27, 2016 at 13:10
  • I need to add any query or just if i add that UserID it should be filter
    – Elina
    Jul 27, 2016 at 13:24
  • I have a two list User Profile Area and Contract Area ContractArea i need to fetch from Contract area list and current logged in user permission i need to check in User Profile Area list Isapproved or Denied.
    – Elina
    Jul 27, 2016 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.