Few days back I had to do some customization involving registering trigger for SOP_DP_Print_Forms procedure, so to save time I google it and ended up to Dynamics GP Community Post having my own answer. 🙂
This time I was trying to directly call this procedure from 3rd party window, but unfortunately I was unsuccessful in doing so, I didn’t get any exception but not able to print the desired report by calling this procedure. May be I am missing anything. I would glad to know if anyone have called this procedure successfully from their dexterity code.
Below is the details from Microsoft Documents for this procedure.
Description:
This script will print Sales Order Processing documents. This script should be called in the background. The different types of documents which can be printed and how to accomplish them are as follows:
Single Document-Set the IN_Type and IN_Doc parameters to the document to be printed.
Batch of Documents-Set the IN_Batch parameter to the regular Sales Order Processing batch (batch source = getmsg(SOP_BATCH_SOURCE).
Range of documents (document number, document date and/or Batch Number)-Set the IN_Start_Doc, IN_End_Doc, IN_Start_Doc_Date, IN_End_Doc_Date, IN_Start_Batch and IN_End_Batch parameters to the desired values at the same time. If Advanced Distribution is available, then a range can also be set for SOP Status using the IN_Start_SOP_Status and IN_End_SOP_Status.
Historical documents can also be printed in ranges with version 8.0.
The first 8 array cells in the array parameters correspond to the following document type constants which are used to store the destinations for the documents and the alignment forms:
SOP_QUOTE
SOP_ORDER
SOP_INVOICE
SOP_RETURN
SOP_BACK_ORDER
SOP_FULFILLMENT_ORDER
SOP_PICKING_TICKET
SOP_PACKING_SLIP
or
SOP_EDIT_LIST
or
SOP_BATCH_LIST
The 9th cell is used for an exception report. The constant for this is:
SOP_EXCEPTION_REPORT
Parameters:
in integer IN_Print_Group_Box; {0=document, 1=alignment form, 2=edit list, 3=batch list}
in integer IN_Type; {the type of the single document}
in ‘SOP Number’ IN_Doc; {the number of the single document}
in ‘Batch Number’ IN_Batch; {the batch number}
in boolean fPrintingList; {Indicates printing from lists}
in ‘SOP Number’ IN_Start_Doc, {the starting document number}
in ‘SOP NUMBER’ IN_End_Doc; {the ending document number}
in date IN_Start_Doc_Date, {the starting document date}
in date IN_End_Doc_Date; {the ending document date}
in ‘Batch Number’ IN_Start_Batch, {the starting Batch Number}
IN_End_Batch; {the ending Batch Number}
in ‘SOP Status’ IN_Start_SOP_Status, {the starting SOP Status}
IN_End_SOP_Status; {the ending SOP Status}
in integer IN_Doc_Sort; {1=document number, 2=customer}
in integer IN_File_Source; {SOP_DiSPLAY_WORK or SOP_DISPLAY_HISTORY}
in integer IN_Match_Packing_Slip; {from SOP_SETP}
in integer IN_Match_Picking_Ticket; {from SOP_SETP}
in boolean IN_Print_PS_Line_Comments; {include line comments on packing slips?}
in boolean IN_Print_PT_Line_Comments; {include line comments on picking tickets?}
in boolean IN_Print_PS_Per_Site; {print separate packing slips for each site?}
in boolean IN_Print_PT_Per_Site; {print separate picking tickets for each site?}
in boolean IN_ReprintPS; {reprint packing slip if already printed?}
in boolean IN_ReprintPT; {reprint picking ticket if already printed?}
in boolean IN_IncludeDSItems; {print drop ship items on packing slip?}
in boolean IN_IncludeBackOrderedItems; {print backordered items on document?}
in boolean IN_Print_Kit_Components; {include kit components?}
in boolean IN_Include_Tax_Details; {include taxes on the documents?}
in boolean IN_Print_Dual_Currencies; {Print Originating and Func currency?}
in integer IN_Tax_Print_Options; {0 = line item and summary, 1 = summary only}
in boolean IN_Print_Inclusive_Tax; {Print Amounts Inclusive of Tax}
in boolean IN_Print_Tax_Invoice; {Print Tax Invoices}
in boolean IN_Print_Adjustment_Note; {Print Adjustment Notes}
in boolean IN_Print_Prev_Printed; {print documents already printed?}
in integer IN_Format[8]; {the format of the different document types}
in boolean IN_Print_Doc[9]; {should each document type be printed?}
in boolean IN_Screen[9]; {should each document type be printed to the screen?}
in boolean IN_Printer[9]; {should each document type be printed to the printer?}
in integer IN_Export[9]; {export type for each document type}
in string IN_Filename[9]; {generic export filename for each document type}
in integer IN_Which_Currency; {1 = originating, 2 = functional}
in ‘Sequence Number’ nSeqNum; {Used to cleanup reports that are deleted from the
process monitor}
in boolean IN_Print_Customer_Item_Document; {Print customer item number on doc?}
in boolean IN_Print_Picking_Instructions; { Print picking instructions on Picking ticket?}
in boolean IN_Include_Kit_Components_PT; {Print kit components on picking ticket?}
in boolean IN_Bin_Sequened; {Sort picking ticket by bins?}
in boolean IN_Sort_Kit_Components; {Sort components when bin sequenced}
in boolean IN_Include_Kit_Components_PS; {Print kit components on packing slip?}
in boolean IN_Print_Customer_Item_PS; {Print customer item number on packing slip?}
in boolean IN_Include_Incomplete_Documents_PT; {Include incomplete docs marked ship complete on picking ticket?}
in boolean IN_Include_Incomplete_Documents_PS; {Include incomplete docs marked ship complete on packing slip?}
inout ListObjState ListObj; {List object data needed for printing from lists}
in boolean IN_Print; {can Print document}
in boolean IN_SendEmail; {can Send Email}
optional inout integer nProcessID = 0;
optional inout boolean fValidDocsToEmail = false;
Filed under: Dexterity Development, Dynamics GP, dynamics-gp