Logging report-use

ib000904ib000904 Member Posts: 19
I want to log which report is run, by whom, and when, over a certain period.
I thought of doing this by adding some C/AL code
[<file>.CREATE(<reportID><userID>.txt)] to the beginning of each report. Trouble is, USERID is available, but where to get the 'REPORTID'
variable? I don't want to have to type that separately for each report that i add the code to.
Or is there another way of doing this logging?

Comments

  • AlbertvhAlbertvh Member Posts: 516
    Hi

    From help
    OBJECTID (Report)
    Use this function to return the name of a report.

    String:=Report.OBJECTID([UseNames])
    String

    Data type: text or code

    Report

    Data type: report

    UseNames

    Data type: boolean

    The UseNames parameter is optional.



    If the parameter is set to TRUE (default value) or if it is empty, the returned string contains the name of the report.

    If the parameter is set to FALSE, the returned string (report xxx) contains the number of the report.


    so you could use - table fieldname := CurrReport.OBJECTID(True);

    Hope this helps


    Albert
  • ib000904ib000904 Member Posts: 19
    Thanks. That helped.
Sign In or Register to comment.