You can check the oSession.CS property, if not equal to zero, use the oSession.PathCSRoot property instead of the oSession.PathRoot property. This should make sure the script works flawlessly across different editions of Sage 100.
Original Message:
Sent: 10-28-2024 15:29
From: Michael Davis
Subject: Launch Crystal Report Via Sage 100 Script 2024 and 64 Bit
That was it.
The oSession.pathRoot was pointing to the C drive.
I change to script to point the UNC path of the server and removed the path root line. Everything is working from the client now. Thank you
------------------------------
Michael Davis
Warren Averett Technology Group
------------------------------
Original Message:
Sent: 10-28-2024 15:06
From: Steve Iwanowski
Subject: Launch Crystal Report Via Sage 100 Script 2024 and 64 Bit
It works in MAS90 Mode from the client but not Advanced? What path is being returned for the path root?
retMSG = oSession.AsObject(oSession.UI).MessageBox("", oSession.pathRoot)
------------------------------
Steve Iwanowski, NextStep Technology Advisors, aka DSD Lancaster PA ¯\_(ツ)_/¯
Original Message:
Sent: 10-28-2024 14:54
From: Michael Davis
Subject: Launch Crystal Report Via Sage 100 Script 2024 and 64 Bit
I have been some more testing on the script program. Once I deleted the C.O Button Link on the Sales Order Screen, and re-added it with the setting to "Execute Script on Server". It works when I am on the server as the domain administrator user.
On the clients' machine, nothing happens. No more script errors, but not report either. It does work in MAS90 mode.
The service account is setup to run as Domain\Administrator.
Also with setting "Execute Script on Client" - I get the above error messages.
Any suggestions will be appreciated.
Thank you
Michael
------------------------------
Michael Davis
Warren Averett Technology Group
Original Message:
Sent: 10-11-2024 07:50
From: David Overholt
Subject: Launch Crystal Report Via Sage 100 Script 2024 and 64 Bit
Thanks Steve,
Just knowing that it is an option might open a whole new world of possibilities that I never considered
Original Message:
Sent: 10/11/2024 7:47:00 AM
From: Steve Iwanowski
Subject: RE: Launch Crystal Report Via Sage 100 Script 2024 and 64 Bit
@David Overholt, yes, for example, I've used a BOI script to Print Preview all the module Setup Options and Trial Balance reports so that I could easily print them to PDF before running an upgrade. But, ironically, I prefer creating and using the custom reports, especially on Premium....
------------------------------
Steve Iwanowski, NextStep Technology Advisors, aka DSD Lancaster PA ¯\_(ツ)_/¯
Original Message:
Sent: 10-11-2024 06:43
From: David Overholt
Subject: Launch Crystal Report Via Sage 100 Script 2024 and 64 Bit
I don't have any input to assist with fixing this, but the subject line intrigues me.
Would it be possible to launch a standard report that uses a worktable with a BOI script outside of Sage? We occasionally (often) have requests to automate and email reports on the Sage 100 menu. We typically create a custom crystal report that doesn't need a worktable and use Visual Cut or Sage Alerts to run and email them.
Original Message:
Sent: 10/11/2024 1:11:00 AM
From: David Speck II
Subject: RE: Launch Crystal Report Via Sage 100 Script 2024 and 64 Bit
The following works for me on a 64-bit installation of 2023. The LastErrorMsg and LastErrorNum properties of oSession may or may not contain useful information as they hold both errors and warnings. They get overwritten throughout various methods too so you want to reset them before your method that may generate an error (can optionally check and store off the values prior to resetting them too) and then check them after your method that may generate an error.
If the nSY_ReportEngine variable comes back as a 0, then something in the ON_CREATE block of code of the SY_ReportEngine class is causing it to fail. I would try a clean uninstall of the Sage 100 workstation, the 32 and 64-bit crystal runtimes, reboot, perform a clean install of the workstation (which should also install the crystal runtimes), and test the script again.
nSY_ReportEngine = 0 : oSession.LastErrorNum = "" : oSession.LastErrorMsg = "" : nSY_ReportEngine = oSession.NewObject("SY_ReportEngine")oSession.AsObject(oSession.UI).MessageBox "nSY_ReportEngine: " & nSY_ReportEngine & vbCrLf & "oSession.LastErrorNum: " & oSession.LastErrorNum & vbCrLf & "oSession.LastErrorMsg: " & oSession.LastErrorMsgoSession.DropObject nSY_ReportEnginenSY_ReportEngine = 0
------------------------------
David Speck II
Blytheco LLC
Original Message:
Sent: 10-10-2024 18:15
From: Kevin Moyes
Subject: Launch Crystal Report Via Sage 100 Script 2024 and 64 Bit
I don't know the reporting objects at all. The only suggestion I have is to separate out your object creation into two pieces like this (which includes a permission check).
oBankCode = oSession.GetObject("GL_Bank_bus")
if oBankCode <> 0 then
Set oBankCode = oSession.AsObject(oBankCode)
else
retVal = oSession.AsObject(oSession.UI).MessageBox("", "Access to GL_Bank_bus is required for the ... script to work.")
exit sub
end if
------------------------------
Kevin Moyes
Technical Systems Analyst
Munjal White Consulting Co.
Toronto ON
Original Message:
Sent: 10-10-2024 18:09
From: Michael Davis
Subject: Launch Crystal Report Via Sage 100 Script 2024 and 64 Bit
Is always good to check the basics. The box for external access is checked.
Any other ideas?
Thank you
Michael
| Michael H . Davis | , | CPA.CITP, MCSE | | |
| |
| |
| | | | | 2500 Acton Road, Birmingham, AL 35243 | | | | Ranked as one of the top managed service providers (MSP) and managed security service providers (MSSP) in the world several years in a row. | | | | | | | |
| |
Original Message:
Sent: 10/10/2024 5:56:00 PM
From: Kevin Moyes
Subject: RE: Launch Crystal Report Via Sage 100 Script 2024 and 64 Bit
Often an "object required" error is caused by the Allow External Access flag not being clicked on in Company Maintenance.
------------------------------
Kevin Moyes
Technical Systems Analyst
Munjal White Consulting Co.
Toronto ON