AR_InvoiceHistoryPrinting with BOI

SOLVED

Anyone ever done this?  I have a list of non-consecutive historical invoices I need to export to a specified directory.  I was going to use the 'QuickPrint' property before calling ProcessReport() for each necessary invoice, but I've only ever performed this when dealing with SOs (where there is only one key field).  For Invoice History printing, would I set the 'QuickPrint' property to InvoiceNo + HeaderSeqNo?

Parents
  • 0

    Upon review, while there is an 'AR_InvoiceHistoryQuickPrint_ui' listed in the object reference (and contains a QuickPrint property), when I attempt to create the object using the below:

    oSS.nSetProgram(oSS.nLookupTask("AR_InvoiceHistoryQuickPrint_UI"))

    I get 'Lookup program failed  The task id "0000000000" is not on file'.

    I attempted to go the other route and use the standard 'AR_InvoiceHistoryPrinting_ui'/'AR_InvoicHistoryPrinting_rpt', adapting the code from this post related to SO printing:

    http://sagecity.na.sage.com/support_communities/sage100_erp/f/100/t/41913.aspx

    However when attempting to call the SetKey method for the record selection, I'm receiving 'Report ID Required' (I have printed the 'INVOICE' form code from the Sage UI already):

    if not cbool(oSS.nSetProgram(oSS.nLookupTask("AR_InvoiceHistoryPrinting_UI"))) then
    	MSGBOX CSTR("Set Program: " + oSS.sLastErrorMsg)
    end if
    
    SET oPrint = oScript.NewObject("AR_InvoiceHistoryPrinting_rpt", oSS)
    
    		if not cbool(oPrint.nSelectReportSetting("INVOICE")) then
    			MSGBOX CSTR("Select report setting 'INVOICE': " + oPrint.sLastErrorMsg)
    		end if
    
    		if not cbool(oPrint.nSetKeyValue("ReportSetting$", "INVOICE")) then
    			MSGBOX CSTR("Select report setting 'INVOICE': " + oPrint.sLastErrorMsg)
    		end if
    
    		if not cbool(oPrint.nSetKeyValue("RowKey$", "1")) then
    			MSGBOX CSTR("Set Rowkey: " + oPrint.sLastErrorMsg)
    		end if
    
    		if not cbool(oPrint.nSetKeyValue("ModuleCode$", "A/R")) then
    			MSGBOX CSTR("Set module code: " + oPrint.sLastErrorMsg)
    		end if
    
    		if not cbool(oPrint.nSetKey()) then
    			MSGBOX CSTR("Setkey: " + oPrint.sLastErrorMsg)
    		end if

  • 0 in reply to Justin K

    When you go into invoice history printing, you have to pick "Accounts Receivable" or "Sales Order" first, is it referring to that?

Reply Children
  • 0 in reply to Sage100User

    I noticed that as well, but I don't believe that's what its referring to.  The reason I say that is because I first got the message 'Module Code Required' when calling SetKey().  That prompted me to add the 'ModuleCode' SetKeyValue line (which suppressed the module code error, but moved me on to the 'report ID' error).