We have a few custom reports that I created button launchers for in various places. As far as I know, they have always worked until recently. I would assume the update to 2013 broke these. Here is the code I was using: '--------------------------------------------------------------------- 'Log on to MAS90 '--------------------------------------------------------------------- Set oScript = CreateObject ("ProvideX.Script") oScript.Init("S:\Sage 100 Standard ERP\MAS90\Home") Set oSS = oScript.NewObject("SY_Session") r = oSS.nLogon() If r=0 Then r = oSS.nSetUser("scriptrunner","password") 'msgbox(r) End If r = oSS.nSetCompany("MX1") '--------------------------------------------------------------------- 'Run Report '--------------------------------------------------------------------- retVal = oSS.nSetDate("A/R", "20140101") retVal = oSS.nSetModule("A/R") retVal = oSS.nSetProgram(oSS.nLookupTask("SY_REPORTRUNTIME_UI")) If retVAL = 0 Then MsgBox(oSS.sLastErrorMsg & vbCRLF & "Report Runtime is not available. Quiting.") End If Set oSORpt = oScript.NewObject("SY_REPORTRUNTIME_RPT",oSS) sCompanyKey = oSS.sCompanyKey sUserKey = oSS.sUserKey sReportFile = "" r = oSORpt.sLoadReport("Customer Statement Reportt","STANDARD","AR",sCompanyKey,sUserKey, sReportFile) msgbox(r) --Returns Nothing r = oSORpt.nProcessReport("preview") --Script bombs here with "Error 712 in method ProcessReport msgbox(r) The report being requested is in the Custom Reports menu, though I have also tried a standard report resulting in the same error. I tried using my admin user for the login, same results. Suggestions?
↧