CurrForm.SETSELECTIONFILTER(SalesCrMemoHeader); SalesCrMemoHeader.COPY(Rec); SalesCrMemoHeader.PrintRecords(TRUE)
WITH SalesCrMemoHeader DO BEGIN COPY(Rec); IF "Shortcut Dimension 1 Code" = 'CONDITION A' THEN ReportSelection.SETRANGE(Usage,ReportSelection.Usage::"S.Cr.Memo") ELSE IF "Shortcut Dimension 1 Code" = 'CONDITION B' THEN ReportSelection.SETRANGE(Usage,ReportSelection.Usage::"S.Cr.Memo(B)"); ReportSelection.SETFILTER("Report ID",'<>0'); ReportSelection.FIND('-'); REPEAT REPORT.RUNMODAL(ReportSelection."Report ID",ShowRequestForm,FALSE,SalesCrMemoHeader); UNTIL ReportSelection.NEXT = 0; END;
Comments
correctly as
???
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Edit: Tried doing it without using WITH. No difference. Thanks again for trying though.