Security Matrix report

Hi All,

I want to develop the Security matrix report in the following format:

1)User ID 2)User Name 3)Legal Entity 4)UserRole 5)Access to Legal Entities 6)Role Contents

I want to know how to fetch 4)UserRole 5)Access to Legal Entities 6)Role Contents this information in to report,

fields 1)User ID 2)User Name 3)Legal Entity i can find userinfo table,

Kindly help me…

Sample Expected output report:

1)John 2)John Smith 3) USMF 4)A-Approval 5) All legal Entities 6)Approve advanced ledger entry transactions

1)John 2)John Smith 3) USMF 4)A-Approval 5) All legal Entities 6)Approve fixed assets budget entries

Awaiting reply!
Thanks for understanding in adavance

An individual user can, a typically has, a more than a single role. To get this m:n relation, query SecurityUserRole table.
The thing at point six is privileges?