Inventory Pick List (report 5752)

G’day Blokes, I need to print sales header fields in the pick list (sell-to customer name). Any tips on how to do this - sales header not a dataitem in this report. All thanks in advance. Cheers and best regards, Matthias.

Hi, You can do it by writing a samll piece of code. 1. Declare a variable SalesHeader (type record and subtype as Sales Header) 2. You can write the code in the Section where you want to print IF NOT SalesHeder.GET(“Document Type”::Order,SalesOrderNo) THEN SalesHeader.INIT; 3. Put a textbox in that section to and assign the SourceExp property as SalesHeader.“Sell-to Customer Name”

G’day Rajesh and thanks for your reply. I have tried this but no success - what is the link between warehouseactivityheader.sourceno and salesheader.no? do I need to setcurrentkey and setrange? Thanks again for your help. Regards, Matthias.

G’day Again, I tried it this way … Warehouse Activity Header - OnPreDataItem() SalesHeader.SETCURRENTKEY(SalesHeader.“Document Type”,SalesHeader.“No.”); Warehouse Activity Header - OnAfterGetRecord() SONumber :=“Warehouse Activity Header”.“Source No.”; SalesHeader.SETRANGE(SalesHeader.“Document Type”,SalesHeader.“Document Type”::Order); SalesHeader.SETRANGE(SalesHeader.“No.”,SONumber); IF NOT SalesHeader.GET(SalesHeader.“Document Type”::Order,SONumber) THEN CurrReport.SKIP; SelltoCustName:=SalesHeader.“Sell-to Customer Name”; SelltoCustNo:=SalesHeader.“Sell-to Customer No.”; ExpShipDate:=SalesHeader.“Requested Delivery Date”; …and get it to work sort of - but need to use globalvars in my sections rather than salesheader.“Sell-to Customer Name” etc Is there are better way or what am I missing? Thanks, Matthias.

No Need to Set the Ranges if you are to use a Get statement. You could use the SalesHeader.“Sell-to Customer” inside the sections, if its a globabl variable and if they are based upon the Warehouse Activity Header or any linked indented data item. Warehouse Activity Header - OnPreDataItem() SalesHeader.SETCURRENTKEY(SalesHeader.“Document Type”,SalesHeader.“No.”); Warehouse Activity Header - OnAfterGetRecord() IF SalesHeader.GET(SalesHeader.“Document Type”::Order,“Warehouse Activity Header”.“Source No.”) THEN BEGIN SONumber :=“Warehouse Activity Header”.“Source No.”; SelltoCustName:=SalesHeader.“Sell-to Customer Name”; SelltoCustNo:=SalesHeader.“Sell-to Customer No.”; ExpShipDate:=SalesHeader.“Requested Delivery Date”; END ELSE BEGIN SalesHeader.INIT; CurrReport.SKIP; END;