Modify Request Page to automatically select Job Number of the open Job

We are using NAV 2013 and I have been able to develop a new report and create a new Icon on the "Job Task Line" ribbon to launch the report. When I click on this icon on the "Job Task Line" ribbon, the "Request Page" will launch but it does not automatically insert the current Job Number of the Job that is actually open at the time.

Is there a simple way to achieve this please?

Answers

  • KishormKishorm Member Posts: 921
    Have a look at how standard NAV does it, e.g. Printing of an invoice from the posted invoice card. It's pretty straightforward.
  • Paul_StaintonPaul_Stainton Member Posts: 2
    Thank you Kishorm,

    I have already done this, checking the request page, CAL Code, etc and can find nothing that seems to indicate what the process is.

    If this exists elsewhere can you please point me in the right direction

    Thank you once again.
  • KishormKishorm Member Posts: 921
    edited 2016-09-06
    you need to do this in the calling code - what you need to is...

    1) create a record Variable for the table you want to filter on, ie the one in your report dataitem
    2) set filter(s) on the record variable as required
    3) if using REPORT.RUN or REPORT.RUNMODAL then pass the record variable as the 4th parameter
    4) if you are using a report variable then instead of step 3 you need call the SETTABLEVIEW function on the report variable and pass it your record variable
  • senthilfsssenthilfss Member Posts: 2

    follow the Steps:
    1. You need create a Record Variable
    2. Use Setrange of the particular record with Varible Record
    3. then find the record variable
    4. REPORT.RUNMODAL("Report ID",TRUE,FALSE,"Record Variable")
    5. Over
Sign In or Register to comment.