Filter dataitem by values in other dataitem in ReportExtension

I’m working on adding a new dataitem to our Pick List report to show all remaining unpicked components from the RPO. I want to be able to filter out any components from this dataitem that exist in the Warehouse Activity Line dataitem from the same report. I’ve tried several iterations of SetFilter/SetRange on the various triggers of the report but they either don’t do anything or only partially filter the list. Thanks for any help you can provide.

I came up with a solution to this by creating a new boolean field called TempPick in the Prod. Order Component table. Then in the OnAfterGetRecord trigger I check to see if the Component exists in the Warehouse Activity Line, if it does then I set the boolean field to TRUE. Then in SSRS I filter on where the boolean field = FALSE.

I probably made this too complicated, I’m still curious to know if there was a way to do this by using SetRange somewhere.

            trigger OnAfterGetRecord()
            var
                PickDoc: Record "Warehouse Activity Line";
            begin
                TempPick := false;
                PickDoc.SetRange("Source No.", "Prod. Order No.");
                IF PickDoc.FindSet() then begin
                    repeat
                        if "Item No." = PickDoc."Item No."
                        then begin
                            TempPick := true;
                        end;
                    until PickDoc.Next = 0;
                end;

            end;