It doesn't work using COM. (That was the only difference between your code and mine. The first version you gave me was exactly what was not working from outside Accpac for me.) I'm guessing that xAPI somehow drops in lower and can administer?
FYI for anyone reading this thread down the line, be...
Thanks for that. So it appears that it works using an XAPI session, and fails using an AccpacCOMAPI session. Do you know why this would be? Is it because it's AS? I haven't had to use an XAPI session for anything else thus far.
The macro that Accpac generates uses the DBLINK_COMPANY AccpacDBLinkType Link to initialize the view. Restated in accordance with your postglnkSys.OpenView "AS0025", vCopygenerates an "ActiveX component can't create object" error.
I would have posted the code sooner if it was anything less generic:glnkComp.OpenView "AS0025", vCopyMy code is set to break on errors. The error message is as reported above: Method 'OpenView' of object 'IAccpacDBLink' failed
It's failing before it even gets to the process step though--on the .OpenView alone.
And I'm specifying a different company, using the ORGIDTARG (I think, that's from memory) field to copy.
Tangentially related question:
As part of this process, users are dumping and loading--copying from a template database to provide a clean copy into which they consolidate data. I was hoping to automate this step through the API (as opposed to dropping and restoring dbs on the server), but the...
Yeah, I've actually found that using stored procs directly against underlying data is far faster and much more flexible than working with consolidation, and am building out reports accordingly, but need to give the users another option (without buying more software).
Hi,
Using macros recorded from the interface as a template, I am trying to automate the export (and, later, import to consolidated db) of GL consolidation data. This code appears to fire the processing half of the export, but not the export.
glnkComp.OpenView "ZC0007", mvExport
Set...
Trying to work around Accpac's rather arcane modular icon tree structure, I have copied a number of "frequently used" icons to a single folder, and renamed them. (I actually went through two folders, because Accpac seemed to sort by order of paste and not by order of icon text. So Folder 1 to...
I would, but because it's a matter of multiple companies and a standalone application alongside it, the simplest would be to automate.
Thanks for your help though.
Let me try a different question then. If you want simple report data available through, say, the Financial Reporter, in a usable format--i.e. rows & columns--without writing direct procs against backend databases and reinventing that wheel, and without user intervention, what do you do?
I'd...
Ah I see. Of a piece with Sage's ingeniously developer-friendly business model, perfect for the year 1992!
Is there a way to specify a server name simply? Nothing I try wants to work, and yet it's somehow getting set by Accpac once the UI initializes, thus getting rid of a prompt I'm very tired...
After further hair-pulling, testing AccpacSessionManager, AccpacSignonManager, etc. (why have one way of starting up when you can have 4?) I'm pretty sure that it comes down to a server name problem.
Once Accpac has been initialized, the COM Api "knows" where the server is and no longer asks...
Thanks for digging that up. I suspect that the SignonManager is the place to look, but I think this is just buggy behavior, and of course there's little documentation.
A couple more details:
- I can call the signon manager successfully but it doesn't change anything.
- If I use the...
No, using those parameters doesn't change anything.
Frustrating--I don't understand how this code can successfully log in for all other purposes except to run a macro.
Is there something else I can do to read the state of the session that might tell me why it's failing?
That's pretty similar to my code--it's not a VBA vs. VB difference anyway. I do notice a difference in your choice of ProgramName argument. Would that perhaps help? I don't know what that argument signifies.
gses.Init ObjectHandle:="", _
AppID:="AS", _...
Using VBA, I'm running an Accpac macro that spits out an FR report, using code like so
Set MyFRReport = CreateObject("AccpacGL9100.AccpacMacro")
With MyFRReport
.CmdFRSelect strSourceFullFile
'blah blah set properties blah blah
.CmdFRPrintEx2 glnkComp, "file", 1...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.