SO_ShippingHistoryReport_rpt - no results

I'm trying to pull InvoiceNo's that shipped on a particular day.

I'm using SO_ShippingHistoryReport_rpt but I'm not getting any results back for a day that has records.

I need a fresh set of eyes and more experience to help me with what I'm missing? Any takers?

pvx.InvokeMethod("Init", sagePath);
            using (DispatchObject oSS = new DispatchObject(pvx.InvokeMethod("NewObject", "SY_Session")))
            {
                #region Sage Set Company
                oSS.InvokeMethod("nSetUser", sageUser, sagePass);
                oSS.InvokeMethod("nSetCompany", sageCompany);
                oSS.InvokeMethod("nSetDate", "S/O", Helper.SageDateNow());
                oSS.InvokeMethod("nSetModule", "S/O");
                #endregion

                int TaskID = (int)oSS.InvokeMethod("nLookupTask", "SO_ShippingHistoryInquiry_ui");
                oSS.InvokeMethod("nSetProgram", TaskID);
			
                using (DispatchObject dispObj = new DispatchObject(pvx.InvokeMethod("NewObject", "SO_ShippingHistoryReport_rpt", oSS.GetObject())))
                {
                    string filter = @"ShipDate$ = """+ sageDate +@"""";
					string columns = @"InvoiceNo$ +""|""+ HeaderSeqNo$ +""|""+ CustomerPONo$ +""|""+ SalesOrderNo$ +""|""+ CustomerNo$ ";
					
                    object[] getResultSetParams = new object[] {
                        columns, // return columns
                        "InvoiceNo$", // key column
                        "",
                        "",
                        filter, // filter
                        "",
                        ""
                        };
                    dispObj.InvokeMethodByRef("nGetResultSets", getResultSetParams);
					getResultSetParams.Dump("results");
				

Parents
  • 0

    Were the invoices you're looking for created using Shipping Data Entry?  If not, there may simply be no data.  Shipping history is only a subset of invoices.

  • 0 in reply to Kevin M

    They were created either in Shipping Data Entry or by Starship. But in this case I can pull the records within Sage: SO | Shipping | Shipping History Report.

    I can use AR_InvoiceHistoryInquiry_svc, but I then have to iterate through the returned collection to retrieve the TrackingID, which is what I'm ultimately looking for. I was hoping to improve performance. I can live with this, but I'm real curious what I'm doing wrong to not get the same results I can get from the UI.

    Thanks for the response.

Reply
  • 0 in reply to Kevin M

    They were created either in Shipping Data Entry or by Starship. But in this case I can pull the records within Sage: SO | Shipping | Shipping History Report.

    I can use AR_InvoiceHistoryInquiry_svc, but I then have to iterate through the returned collection to retrieve the TrackingID, which is what I'm ultimately looking for. I was hoping to improve performance. I can live with this, but I'm real curious what I'm doing wrong to not get the same results I can get from the UI.

    Thanks for the response.

Children