Jump to content
We've recently updated our Privacy Statement, available here ×
  • How to get Report Name in an Audit Domain and/or Audit Report


    stasp
    • Version: v6.4.2 Product: JasperReports® Server

    Report names are not stored in the JIAuditEvent table (when the Audit feature is enabled on the server). Only the resource_uri is stored for reports, same as for other resources. Furthermore, there is no resource_uri stored in other tables (like JIResource), so there is no straightforward way to join tables and display a report name for Audit. 

    However, you can try to join the JIResource and JIResourceFolder with the foreign key parent_folder, and then for the full report uri by combining the parent folder path with resource name. Then you could join this with JIAuditEvent.

    For example, you can create a derived table in the existing Audit Domain, e.g. new_table, as the following query: 

    select distinct rf.uri || '/' || r.name as resource_uri, r.label as resource_name 
    from jiresource r, jiresourcefolder rf 
    where r.parent_folder=rf.id; 
    

    Then you can join this derived table with JIAuditEvent table by key: new_table.resource_uri=jiauditevent.uri. After the join, you should be able to use the resource_name for your Domain/report.


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...