FindPrinter in NAV 2009

Rob_HansenRob_Hansen Member Posts: 296
edited 2009-03-31 in NAV Three Tier
It doesn't appear that the FindPrinter logic in codeunit 1 is triggered when using the RTC. Can anyone confirm that? If that function isn't used, what is the process for directing reports to specific printers or programmatically overriding the printer to be used for a given routine?

(I could go through the steps to debug in visual studio for the RTC and see what triggers are hit when a report is printer, but I figure somebody will already know the answer to this!

Comments

  • Rob_HansenRob_Hansen Member Posts: 296
    Further to this...

    When I set up a record in printer selections with a blank User ID (i.e. meaning to direct a report for ALL users to a given printer) it doesn't seem to work in the RTC but does in the classic client. If I fill in the user ID, it seems to work in both clients. I know the RTC isn't calling FindPrinter to look up printer selections, so I'm trying to figure out where the logic does exist for this functionality in the RTC. Let me know if you know where this is...
  • Rob_HansenRob_Hansen Member Posts: 296
    I think I'll just continue having a conversation with myself on mibuso. It's healthier than talking out loud to myself...I think.

    So...the RTC seems to use the printer selection setup so long as there is a record for the specific User ID. A record for a given User ID with Report ID 0 works fine too...it would direct all reports for that user to the specified printer. It just doesn't seem to work for generic printer selections for all users (blank User ID).

    The thing that seems to be lacking from what I can see is that this logic appears to be embedded in the executable. Whereas the classic client logic is in the FindPrinter function and can be modified, I can't find any C/AL logic to do this for the RTC. I exported all objects to text and searched for references to Record 78 and the only one I can see is in the FindPrinter function (which the RTC doesn't use).

    If anyone knows any more about this or can confirm that it's embedded in the executable, let me know.
  • kinekine Member Posts: 12,562
    I have used the debugger and SQL profiler and yes, it seems that this is implemented internaly and the NST is looking only for entries for the user, not for empty ID if not wind for the user as it is written in CU1.

    You can try to report this as a bug.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Rob_HansenRob_Hansen Member Posts: 296
    As one more footnote to this, FindPrinter IS triggered by the RTC when printing a classic report with no SRS layout. It's business as usual for any of those.
Sign In or Register to comment.