Report Logging in NAV 3.7

couberpucouberpu Member Posts: 317
Hi,

I read about report logging in NAV 5.0 and 2009 and it is very good.

We are still running NAV 3.7, is there a way to do the same?
Please advise.

Thanks,
Couber

Comments

  • couberpucouberpu Member Posts: 317
    Hi to myself,

    Is it true that codeunit 1 always involved when running a report?

    Please help.


    Thanks,
    Couber
  • couberpucouberpu Member Posts: 317
    I am thinking about adding code in FindPrinter to log reports not using systemprinter.
    Since most of the reports are not using system printer and I can do a one time scan to identify how many reports are using system printers. This should work.

    ** The goal here is to figure out whay report was needed for new ERP system.
  • couberpucouberpu Member Posts: 317
    Well, I asked the question and I kind of played one man show here.

    This is the blog helped me out:

    http://blogs.msdn.com/b/nav/archive/201 ... usage.aspx

    Even with NAV 3.7, I can use the idea in this great blog and comments about using FinfPrinter and using COMMIT to create a report log, with the exception that use system printer = yes.
    One thing I did different is to add a usage counter to count how many times a report was used, with ReportLog.SETRANGE("Report ID",ReportID); and ReportLog.Usage += 1;

    Thanks
  • easy-navieasy-navi Member Posts: 31
    Yes you can add some code in CU1\FindPrinter trigger, but the problem is that in this particular place system cannot
    insert a record to any table :( so there will be error if you put there:
    ReportLog.Insert;
    

    I had the same problem :( but I managed to solve it by force NAV to write the report-excecutions in the external text file.
    p.s.
    we have Nav 4.03 sp3
    http://www.reinwestuj.pl Inwestuj w nieruchomości. Condohotele, aparthotele.
  • couberpucouberpu Member Posts: 317
    easy-navi wrote:
    Yes you can add some code in CU1\FindPrinter trigger, but the problem is that in this particular place system cannot
    insert a record to any table :( so there will be error if you put there:
    ReportLog.Insert;
    

    I had the same problem :( but I managed to solve it by force NAV to write the report-excecutions in the external text file.
    p.s.
    we have Nav 4.03 sp3

    Yes, I did run into a big error message box. But the error message suggested to use COMMIT after the INSERT, or MODIFY, to fix the error. It was also confirmed by Mike G. of his comment on the blog mentioned above.
  • BernardJBernardJ Member Posts: 57
    Be careful with a COMMIT which may be in the midst of a whole process.

    This problem can also be overcome by using a temptable, see http://dynamicsuser.net/blogs/mark_brummel/archive/2009/12/01/tip-20-save-report-usage.aspx for details
  • couberpucouberpu Member Posts: 317
    BernardJ wrote:
    Be careful with a COMMIT which may be in the midst of a whole process.

    This problem can also be overcome by using a temptable, see http://dynamicsuser.net/blogs/mark_brummel/archive/2009/12/01/tip-20-save-report-usage.aspx for details

    Thanks.
Sign In or Register to comment.