Nav 2016 Report preview pop up on page.

In nav 2009 while run report  firstly shows page and pop report preview on that page. In Nav 2016 i write same code but it not process same.

 

My Code: 

CurrPage.SETSELECTIONFILTER(SalesHdr);
REPORT.RUNMODAL(REPORT::"Sales Planning",TRUE,FALSE,SalesHdr);

SalesPlanForm.SetSalesOrder("No.");
SalesPlanForm.RUNMODAL;

In nav 2016 my requirement is first show report preview and after ESC button press then need to show page.

 

Please help me... 

  • have you tried this
    PAGE.RUNMODAL(PageNumber,salesHdr); instead of
    SalesPlanForm.SetSalesOrder("No.");
    SalesPlanForm.RUNMODAL;
Related