Sage100ERP.Reporting.dll

I have been using the Sage100ERP.Reporting.dll to automate Crystal Reports and export data at a number of clients without issue.  I am in the middle of an upgrade to version 2018, and my script is coming back with an error on this line:

Set report = CreateObject("Sage100ERP.Reporting.Repot")

The error says "The system cannot find the file specified."

I have registered the dll with an administrator cmd prompt using:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\regasm "\\<Server>\<Share>\MAS90\Home\Sage100ERP.Reporting.dll" /codebase

I have verified the dll shows up in the registry.

I am running a .bat file that launches the .vbs file so it can be run in 32-bit mode from the 64-bit server.  It has this code:

C:\Windows\SysWOW64\wscript <PathToSage>\MAS90\CM\Script\<ScriptName>.vbs

I have verified that other objects can be created such as "Scripting.FileSystemObject".

I have verified that it works on my computer also.

I cannot figure out what it is about this server environment that is making this dll not available.

Thanks.

  • 0

    Set report = CreateObject("Sage100ERP.Reporting.Repot")  <=== Looks like you're missing an "r" in Report Slight smile

  • 0 in reply to jepritch

    Sorry, I typed that out.  The code does have the "r".

  • 0 in reply to Gator

    Beginning of vbs code (this time I copied from the file):

    ' Creates report object
    Set report = CreateObject("Sage100ERP.Reporting.Report") <---- Errors here

    ' Loads report
    report.Load("<PathToSage>\MAS90\Reports\<ReportName>.rpt")

  • 0

    William is error occurring on your previous to 2018 version of Sage 100 after having installed 2018? If so, maybe you need to do the pvxwin32.exe.config copy trick to the pre-2018 version \Home folder. Why don't you go to Knowledge Base and enter 86964 (the KB ID) for the search and review that article. Although it's not directly about instantiating Sage100ERP.Reporting.Report it seems relevant.

    Based on your script if you think it's more BOI related, and it's the 2018 script failing, here is a copy/paste from Kent Mackall's posting on a BOI script resolution: https://bit.ly/2U9ZWxG

    Greetings,

    This is an issue with Crystal and COM (BOI) for the Sage 100 2018 Release. To correct this, copy the pvxwin32.exe.config from the Sage 100 2018 installs ..\mas90\home folder to the C:\Program Files (x86)\Common Files\Sage\CommonComponents folder and then RENAME the file to pvxcom.exe.config.

    Thank you,

    Kent Mackall

  • 0 in reply to Alnoor

    Thanks for the feedback.  This is a new server and it only has version 2018 installed where the error is occurring.  Copying and renaming the .config file still gives the same error.  This is not BOI related.  I have other BOI scripts that are working correctly on the server.  I am only getting an issue with the dll.

  • 0 in reply to Gator

    I discovered something very interesting. You mentioned that you had installed 2018 on a fresh machine. I had also installed 2018 fresh. So I took a fresh workstation, installed 2018 on it, and was able to replicate the error. I then uninstalled version 2018 workstation, and installed 2017 workstation. The script worked as it should. I then also installed version 2018 workstation and it got past that error message about the file not being found. I think the error only seems to come about when you install 2018 fresh without having 2017 on there previously.

    Update: 

    Although I got past the "file not found" error, I've run into a second problem. After I uninstalled workstation setup 2018 on this machine, and installed workstation 2017, I was able to run my script and export a small PDF. However, after installing workstation 2018 on the same machine, it still gets past the "file not found" error but now errors out at the exporting part.

    Error:

    Sage100ERP.reporting: Unable to cast COM object of type 'CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass' to interface type 'CrystalDecisions.ReportAppServer.Controllers.ISCRReportsource'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{98CDE168-C1BF-BE4C-F2CFA7CB8398}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

    Here is my script:

    Set rpt = CreateObject("Sage100ERP.Reporting.Report")
    rpt.Load("\\server\share\Crystal Reports\TEST.rpt")
    connectionString = <<this is my connection string>>
    rpt.SetConnection connectionString
    rpt.Export 5, 1, "c:\sage\TEST.pdf"