I created a button on the Vendor Maintenance screen that runs the AP Aging report. I pass in the AP Division and Vendor numbers, but I can't get the report to filter by those values. (Want to run the Aging for the Vendor displayed, like the Sage button does in Customer Maintenance.)
I suspect it is the "Tag$" syntax that is incorrect. Here is my script:
strSelect = AP_Vendor_bus_APDivisionNo & AP_Vendor_bus_VendorNo
oARReport = oSession.GetObject("AP_AgedInvoiceReport_ui")
Set oARReport = oSession.AsObject(oARReport)
retval = oARReport.SelectReportSetting("STANDARD")
retval = oARReport.SetKeyValue("ReportSetting$","STANDARD")
retval = oARReport.SetKeyValue("RowKey$","1")
retval = oARReport.SetKey()
retVal = oARReport.SetValue("SelectField$", "Vendor Number")
retVal = oARReport.SetValue("SelectFieldValue$", "Vendor Number")
'retVal = oARReport.SetValue("Tag$", "TABLE=AP_Vendor;COLUMN=APDivisionNo$,VendorNo$;") 'incorrect syntax?
retVal = oARReport.SetValue("Tag$", "TABLE=AP_Vendor;COLUMN=APDivisionNo$;") 'tried setting it in 2 lines - no luck
retVal = oARReport.SetValue("Tag$", "TABLE=AP_Vendor;COLUMN=VendorNo$;")
retVal = oARReport.SetValue("Operand$", "=")
retVal = oARReport.SetValue("Value1$", strSelect)
retVal = oARReport.Write
retVal = oARReport.ProcessReport("PREVIEW")
retVal = oSession.DropObject("AP_AgedInvoiceReport_rpt")
Does anyone know what I'm doing wrong? Thanks!
Hollie