PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 11/17/2015 8:40 AM by  Joan Herzfeldt
Can you query this in LRS?
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages
Ronnie
Business Analyst
BMH
Veteran Member
(341 points)
Veteran Member
Posts:143


Send Message:

--
11/17/2015 7:07 AM
    I have been asked to check into querying our LRS for some info.

    We are wanting to see what users are tied to all of our reports. Sure I could go into each report and look and see what users and roles are assigned, and then go into security and see who is assigned to each of those roles, BUT we have almost 600 reports I have to query through.

    I have found the LRS database and tables, but I do not find the info where it shows what users and roles are assigned to the reports.

    Joan Herzfeldt
    System Analyst
    Genesis Health System
    Veteran Member
    (134 points)
    Veteran Member
    Posts:50


    Send Message:

    --
    11/17/2015 8:28 AM
    Here is the sql statement from the crystal report that I created to pull that information.
    SELECT "ERS_REPORTACCESS"."INSTANCEID", "ERS_REPORTS"."REPORTID", "ERS_REPORTS"."REPORTNAME", "ERS_REPORTACCESS"."JOBNAME", "ERS_REPORTACCESS"."ACCESSVALUE"
    FROM "LAWRS"."ERS_REPORTS" "ERS_REPORTS" INNER JOIN "LAWRS"."ERS_REPORTACCESS" "ERS_REPORTACCESS" ON ("ERS_REPORTS"."REPORTID"="ERS_REPORTACCESS"."REPORTID") AND ("ERS_REPORTS"."INSTANCEID"="ERS_REPORTACCESS"."INSTANCEID")
    WHERE "ERS_REPORTACCESS"."ACCESSVALUE">='A' AND "ERS_REPORTACCESS"."INSTANCEID"=0
    ORDER BY "ERS_REPORTS"."REPORTID", "ERS_REPORTACCESS"."JOBNAME"

    Joan Herzfeldt
    System Analyst
    Genesis Health System
    Veteran Member
    (134 points)
    Veteran Member
    Posts:50


    Send Message:

    --
    11/17/2015 8:40 AM
    I don't like how Crystal sql statements look. The two tables are ERS_REportAccess and ERS_Reports Link on Report id and Instance ID.
    Criteria is {ERS_REPORTACCESS.ACCESSVALUE} >= 'A'
    and {ERS_REPORTACCESS.INSTANCEID} = 0 --every report has a zero instance, but the table also contains all of the instances created for each report.
    and " " in {ERS_REPORTACCESS.ACCESSVALUE}
    You are not authorized to post a reply.