0

I am trying to open two of the same report (different filters) when clicking on the print PDF function. I want to be able to open both reports clicking this rather than repeating myself.

Currently I am able to open one of the reports, NAV will flash at me in the task bar and another window will prompt, I will click the print PDF option again and the second report will open.

I understand this is because of the second CLEAR line but when I remove that line it throws up an error saying that line needs to be inserted.

CLEAR(Report01);

SalesHeader.RESET;

SalesHeader.SETRANGE    ("Document Type","Document Type");

SalesHeader.SETRANGE    ("No.","No.");

Report01.SetExampleOne;

Report01.SETTABLEVIEW   (SalesHeader);

Report01.RUNMODAL;

CLEAR   (Report1); 


SalesHeader.RESET; 


SalesHeader.SETRANGE    ("Document Type","Document Type");


SalesHeader.SETRANGE    ("No.","No.");


Report1.SetExample2;


Report1.SETTABLEVIEW    (SalesHeader);


Report1.RUNMODAL;
Siong Thye Goh
  • 3,518
  • 10
  • 23
  • 31

1 Answers1

0

Use Report.RUN instead of Runmodal. Modal window mean exactly one window will be opened and rest will be postponed.

Mak Sim
  • 2,148
  • 19
  • 30