Can you query this in LRS?

 2 Replies
 2 Subscribed to this topic
 22 Subscribed to this forum
Sort:
Author
Messages
Ronnie
Veteran Member
Posts: 152
Veteran Member
    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
    Veteran Member
    Posts: 74
    Veteran Member
      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
      Veteran Member
      Posts: 74
      Veteran Member
        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}