Report question?

Purchase header and purchase lines form. User enters 50 lines of purchase items on the form. I want to run a report #50000 from the Purchase Header form that uses the 50 lines Item numbers as a filter for report #50000. Any Ideas to do this in the most efficient manner? Thanks

  1. Report 50000 is not a standard report (all the numbers between 50000 - 99999 are used by customized mods) so not knowing the 50000 report structure is hard to give an exact answer. 2) Whatever the report is if it’s using an item dataitem and you want to filter by the lines item numbers just do as follows: 1) Parameter record type purchase header. 2) onAfterGetRecord var purchlines record purchase lines; clear (purchlines); purchlines.reset; purchlines.SETRANGE(“Document type”,Purchheader.“document type”); purchlines.SETRANGE(“Document No.”,Purchheader.“No.”); purchlines.setrange(“Type”,purchlines.“Type”::Item); Purchlines.SETRANGE(“No.”,Item.“No.”); IF (NOT Purchlines.FIND(’-’)) THEN CurrReport.SKIP; Regards,