Options

Object Usage Tracking

jae3240jae3240 Member Posts: 13
I am interested in tracking when an object (report) was last run. We currently have a lot of custom reports - which I'm sure there a lot that are not used. So in order to free up some of those object #'s, i would like to see if they are being run at all. Does anyone do this currently? Is it an add-on or is there a code modification that I can make to track this?

Thanks in advance for any help you can provide!

John

Comments

  • Options
    DakkonDakkon Member Posts: 192
    Off hand, I am not aware of any addons for this. You can manually make code changes to do this yourself but it will be time intensive and you will need a developer license to do this. You will also need to create a new table to store your tracking data. Basically, you will need to edit ever single report and insert some code that inserts usage statistics into your new table. This is not hard but depending on how many reports you wish to track it could take some time to do.
    Thad Ryker
    I traded my sanity for a railgun :mrgreen:
  • Options
    jae3240jae3240 Member Posts: 13
    Is there a code unit that ALL reports run that would be able to capture that information? Instead of editing the code in every report?
  • Options
    Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Maybe you can remove these reports from all of the permissions. If some user calls and misses a report you can give access to it.

    If nobody calls, the report is not used.
  • Options
    DakkonDakkon Member Posts: 192
    Unfortunately no, there is no central codeunit that all reports call. More correctly there is no central codeunit that is passed any identifiable data that would allow you to determine that it's a report (and it's number) that is calling.
    Sadly, any way you go about it you will likely spend a fair amount of time at it.
    Thad Ryker
    I traded my sanity for a railgun :mrgreen:
  • Options
    Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    There is a central codeunit if you define a printer selection for each report.

    They will all pass function FindPrinter in codeunit 1.
  • Options
    ajhvdbajhvdb Member Posts: 672
    You are correct and you don't need to define anything. All Reports will pass function FindPrinter.
  • Options
    Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Unfortunately "ProcessingOnly" reports do not use this function.

    I should not advise to change codeunit 1 anyway.

    Just change the permissions and send a mail into your orginasation telling you've done this.
  • Options
    DakkonDakkon Member Posts: 192
    Cool tip nonetheless. I was unaware of the findprinter funtion:)
    Thad Ryker
    I traded my sanity for a railgun :mrgreen:
  • Options
    Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    There are some internal navision functions in codeunit 1 but you realy need to be carefull modifying these.
  • Options
    DakkonDakkon Member Posts: 192
    I'm familiar with most of them, never really noticed the find printer. I tend to avoid all the make* and find* functions out of paranoia. I've found LogInStart and LogInEnd to be incredibly handy, for many things. I just wish LogInEnd wasn't triggered until the client was closed instead of when the main menu is closed.
    Thad Ryker
    I traded my sanity for a railgun :mrgreen:
  • Options
    Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Dakkon wrote:
    I just wish LogInEnd wasn't triggered until the client was closed instead of when the main menu is closed.

    It does in 4.0 either when swiching companies or closing navision. Closing the menusuite does not trigger the LogInEnd.

    In 4.0 you have the CompanyClose trigger.
  • Options
    DakkonDakkon Member Posts: 192
    That's very good to know. My employer is about to upgrade to 4.0 from 2.6 ...or rather I'm about to upgrade them so that's good to know.
    Actually our plan is to take a fresh 4.0 and start over. Less chance for buggy custom mods with our overcustomized monster:)
    Thad Ryker
    I traded my sanity for a railgun :mrgreen:
  • Options
    Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Succes with the upgrade, and with learing the MenuSuite. :D
    It is nice once you get used to it. 8)
Sign In or Register to comment.