does accpac handles global Vars where stores current company info perhaps? How do I access those vars to pass it to my new programs or reports as parameters?
Add CMPNAME as a parameter in your Crystal Report and use it, Accpac always passes the company name to CMPNAME.
You can also look at AccpacSession.CompanyID as tuba says.
If your executable has a reference to the COMAPI, and you initialize a Session object and login to Accpac, then you'll get the CompanyID. There are no arguments to pass.
I am not really sure what you mean. I donot know what comapi is, neither initializing a session object???????
this is what I did, I made an app with Visual Foxpro, compile it to an exe file, then inside the accpac application I add a new item to the order entry, specifically to the report menu,
new/program
then i reference my exe so my exe runs inside accpac
so, based on that , could you be so kind and elaborate for this accpacc newbie?
Oh, you mean a simple non-COMAPI executable? There's nothing to pass, Accpac doesn't work that way. You might be try gleaning the current company from HKEY_CURRENT_USER\Software\ACCPAC INTERNATIONAL, INC.\ACCPAC\DESKTOP\Company, and the user from HKEY_CURRENT_USER\Software\ACCPAC INTERNATIONAL, INC.\ACCPAC\DESKTOP\User.
There is a lot of legwork to do to get an app written the way you are to seamlessly integrate with Accpac, this is way beyond discussing in a forum like this. Either deal with the integration issues in your app as tube suggested, or use VBA and you do not have the integration issues.
Why do you need to use VFP (of all the options out there) and compile an exe?
Thnks Tuba2007. This registry stuff helped me to achive what i was looking 4.
additional question: what if ACCPAC is ran twice on the same computer? I noticed it changes the info, so the last logging prevails? is the last login the one recorded on the registry?
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.