Printing other table report from current form

KisuKisu Member Posts: 381
Hmm this came to me as a little hard task.
What would be the proper way to print a report that uses different table than the current form you are in?
The report should still have to be sorted with the "No." of the current form. The Rec's dont mach on the tables but the number does. :?
K.S.

Answers

  • kapamaroukapamarou Member Posts: 1,152
    Declare a variable for the 2nd record (recB)

    then do:

    recb.RESETT;
    recB.SETCURRENTKEY(the key you want);
    recB.SETRANGE("No.","No."); 'Or whatever the fields are...
    ..
    ...
    ..

    and then either REPORT.RUN(recB...) or declare a variable for the report and pass the record and then run it......
  • KisuKisu Member Posts: 381
    Ah I was on the right path. That solved it, thanks Kapa :)
    K.S.
  • kapamaroukapamarou Member Posts: 1,152
    You're welcome. :D
  • kinekine Member Posts: 12,562
    Kisu wrote:
    Ah I was on the right path. That solved it, thanks Kapa :)
    D not forget to mark the post as solved... you have new tool for that now...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • krikikriki Member, Moderator Posts: 9,110
    kine wrote:
    Kisu wrote:
    Ah I was on the right path. That solved it, thanks Kapa :)
    D not forget to mark the post as solved... you have new tool for that now...
    =D> =D> =D>
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.