Run a report from a report

sp4tcsp4tc Member Posts: 16
Hi all, I have a report where the user enters an invoice number and then runs the report.

I would like to print a copy of the invoice when the user prints my report.

I have tried using Report.run but I am not recieving the filters from the user input

any help would be appreciated.

Regards

Comments

  • navuser1navuser1 Member Posts: 1,329
    sp4tc wrote:

    I have tried using Report.run but I am not recieving the filters from the user input

    from C/SIDE Reference Guide

    REPORT.RUN(Number [, ReqWindow] [, SystemPrinter] [, Record])

    ReqWindow

    Data type: boolean

    Tells the system whether it should display the request window for the report. The request window is part of the report object.
    Now or Never
  • sp4tcsp4tc Member Posts: 16
    Yes, I have this running but the filter from my report is not passing to the invoice report, I need help with the Record/variable part of the code

    REPORT.RUN(50020,False,True,?????)

    how do I finish this line of code to have the filter?
  • navuser1navuser1 Member Posts: 1,329
    sp4tc wrote:
    REPORT.RUN(50020,False,True,?????)


    from the same..

    Recnavuser1.SETFILTER(Field, Filter);

    REPORT.RUN(50020, false, true, Recnavuser1])
    Now or Never
  • DaveTDaveT Member Posts: 1,039
    Hi,

    to copy the current filters to a variable use the COPYFILTERS command.

    ..or use GETFILTER and SETFILTER on the invoice no.
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • i4tosti4tost Member Posts: 208
    in which trigger you added your code?
Sign In or Register to comment.