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;