There is (was) a way to do this in 6.1. I have never tried it in SQL or 8.x or with Crystal & ODBC. But I think the table structures ought to be relatively the same so this might help investigating this.
You can get the current connection info from the hidden _MyConneciton table and proceed from there. This means that the root of all table linking has to be this table. An example Report Builder report I have has the following links to get to the OrderHed table.
_MyConnection to Connect (using _MyConn.PID field)
Connect to UserFile (using _Connect-name to DcdUserID field)
UserFile to OrderHed (using CurComp to Company field)
I believe you must be signed in to Vantage for the CurComp field to be populated for a given session ID.
-Todd C.
________________________________
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of farshad aboobacker
Sent: Sunday, January 13, 2008 6:22 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Current logged in user & company in Vantage
Hi All,
We have created a program in Visual Basic that connects to Vantage SQL DB using ODBC connection. The module has been developed to take care of Post Dated Cheques and some MIS reports in Crystal that runs using stored procedures. The program is attached as a menu item in Vantage.
We would like to know if there is a way to find out which company a Vantage User is accessing, so that the module we have devloped also defaults to the same company. We found that this information is available in "Maintain sessions" option in Admin tool. But, this is not something that could be retreived to Visual Basic. Have anyone come across this requirement? Or is the current user and logged-in company info available in the SQL DB? Any help in this regards would be highly appreciated.
Thank you and regards,
Farshad.
---------------------------------
Looking for last minute shopping deals? Find them fast with Yahoo! Search.
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
You can get the current connection info from the hidden _MyConneciton table and proceed from there. This means that the root of all table linking has to be this table. An example Report Builder report I have has the following links to get to the OrderHed table.
_MyConnection to Connect (using _MyConn.PID field)
Connect to UserFile (using _Connect-name to DcdUserID field)
UserFile to OrderHed (using CurComp to Company field)
I believe you must be signed in to Vantage for the CurComp field to be populated for a given session ID.
-Todd C.
________________________________
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of farshad aboobacker
Sent: Sunday, January 13, 2008 6:22 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Current logged in user & company in Vantage
Hi All,
We have created a program in Visual Basic that connects to Vantage SQL DB using ODBC connection. The module has been developed to take care of Post Dated Cheques and some MIS reports in Crystal that runs using stored procedures. The program is attached as a menu item in Vantage.
We would like to know if there is a way to find out which company a Vantage User is accessing, so that the module we have devloped also defaults to the same company. We found that this information is available in "Maintain sessions" option in Admin tool. But, this is not something that could be retreived to Visual Basic. Have anyone come across this requirement? Or is the current user and logged-in company info available in the SQL DB? Any help in this regards would be highly appreciated.
Thank you and regards,
Farshad.
---------------------------------
Looking for last minute shopping deals? Find them fast with Yahoo! Search.
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]