OK, I think I have this nailed now. Since I've never seen an explanation
here before I'll describe it in case anyone is interested.
1. Starting with the table _MyConnection I link to _Connect (alias name
Connect) via _MyConn-PID--->_Connect-PID
2. Link Connect to UserFile via Connect-Name----> DcdUserID
3. Link (for testing purposes) UserFile to OrderHed via CurComp----->
Company (or use whatever master file you would have used for the report).
At this point the fields Connect._Connect-Name and UserFile.CurComp are
available for the report header which will show the user running the report
and the company they logged into in Vantage. NOTE!!! This might not be the
current company they are using. For some reason when you change company on
the fly (via Options) it does not re-set CurComp. If you change company and
also change user, even to yourself, it does re-set the current company in
UserFile. I wrote a little test program for the above and it works fine and
shows UserID in header and selects only current company records.
A thought occurred to me that an easier way to get the current company on a
header (but not automatic filter for it) might be just to display the
Company field from any table in the report. This would show just the
company in use. But if you also need UserID then you have to link via
company (only common field to all the other Vantage tables) and this would
create a de facto filter on whatever company is currently in
UserFile.CurComp thus you would need a user procedure so that every time a
user changes company from within Vantage they also change user (even to
themselves) and log-in again.
Note: Changing the Master Table in an existing report to _MyConnection then
changing all the other tables would be near impossible. So this would be
for new reports only but it could still be useful.
-Todd Caughey
Harvey Vogel Mfg. Co.
[Non-text portions of this message have been removed]
here before I'll describe it in case anyone is interested.
1. Starting with the table _MyConnection I link to _Connect (alias name
Connect) via _MyConn-PID--->_Connect-PID
2. Link Connect to UserFile via Connect-Name----> DcdUserID
3. Link (for testing purposes) UserFile to OrderHed via CurComp----->
Company (or use whatever master file you would have used for the report).
At this point the fields Connect._Connect-Name and UserFile.CurComp are
available for the report header which will show the user running the report
and the company they logged into in Vantage. NOTE!!! This might not be the
current company they are using. For some reason when you change company on
the fly (via Options) it does not re-set CurComp. If you change company and
also change user, even to yourself, it does re-set the current company in
UserFile. I wrote a little test program for the above and it works fine and
shows UserID in header and selects only current company records.
A thought occurred to me that an easier way to get the current company on a
header (but not automatic filter for it) might be just to display the
Company field from any table in the report. This would show just the
company in use. But if you also need UserID then you have to link via
company (only common field to all the other Vantage tables) and this would
create a de facto filter on whatever company is currently in
UserFile.CurComp thus you would need a user procedure so that every time a
user changes company from within Vantage they also change user (even to
themselves) and log-in again.
Note: Changing the Master Table in an existing report to _MyConnection then
changing all the other tables would be near impossible. So this would be
for new reports only but it could still be useful.
-Todd Caughey
Harvey Vogel Mfg. Co.
[Non-text portions of this message have been removed]