Print BAQ Report with button. Almost there


(system) #1

 Thanks JG!


I was able to get the number by importing with code the DLL that contained the ConsoleSessionID.  If anyone runs into anything similar see:


http://groups.yahoo.com/neo/groups/vantage/conversations/messages/108981


Just remember you need to add the following line to your imports to manually import the dll:


using System.Runtime.InteropServices;


For some reason, using the Assembly Reference Manager doesn't work when trying to import Epicor.Mfg.Lib.GetConsoleSessionID.dll... At least on my version it doesn't


Thanks again!




---In vantage@yahoogroups.com, <vantage@yahoogroups.com> wrote:

You can’t reliably generate those workstation ids. The ID in that case would be the session number of windows, my guess is this would be a term services env. Your best bet is to use the WorkstationID prop in session.

 

Joshua Giese

CIO

920.437.6400 Ext. 337

Site ID: 27450-E905700B2-SQL64

Wisconsin Converting, Inc.

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of chan213419@...
Sent: Monday, October 28, 2013 1:56 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Print BAQ Report with button. Almost there.

 

 

Good day users!  I was wondering if anyone could help me with one small issue I'm having regarding the BAQReportParam WorkStationID.  The rest of my code is working just fine, it's just I can't seem to get the WorkStationID param correct and as a result my BAQ Report is not printing from my button.

 

When I run a trace and print the report normally I find that the WorkStationID parameter is "TheNameOfMyMachine 9"  I need to know what the 9 is.  

 

I've seen many examples of how to do this across the UsersGroup, and it seems like nearly everyone hard-codes this number after Environment.MachineName i.e.:

 

dsPrintReport.Tables["BAQReportParam"].Rows[0]["WorkstationID"] = Environment.MachineName + " 9";

 

But I can't do this as the number changes, when using different logins etc.  I need some logic behind the number after the MachineName.  Can anyone tell me what it is?

 

Thank you all,

Chan


(system) #2
Good day users!  I was wondering if anyone could help me with one small issue I'm having regarding the BAQReportParam WorkStationID.  The rest of my code is working just fine, it's just I can't seem to get the WorkStationID param correct and as a result my BAQ Report is not printing from my button.

When I run a trace and print the report normally I find that the WorkStationID parameter is "TheNameOfMyMachine 9"  I need to know what the 9 is.  

I've seen many examples of how to do this across the UsersGroup, and it seems like nearly everyone hard-codes this number after Environment.MachineName i.e.:

dsPrintReport.Tables["BAQReportParam"].Rows[0]["WorkstationID"] = Environment.MachineName + " 9";

But I can't do this as the number changes, when using different logins etc.  I need some logic behind the number after the MachineName.  Can anyone tell me what it is?

Thank you all,
Chan

(system) #3

You can’t reliably generate those workstation ids. The ID in that case would be the session number of windows, my guess is this would be a term services env. Your best bet is to use the WorkstationID prop in session.

 

Joshua Giese

CIO

920.437.6400 Ext. 337

Site ID: 27450-E905700B2-SQL64

Wisconsin Converting, Inc.

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of chan213419@...
Sent: Monday, October 28, 2013 1:56 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Print BAQ Report with button. Almost there.

 

 

Good day users!  I was wondering if anyone could help me with one small issue I'm having regarding the BAQReportParam WorkStationID.  The rest of my code is working just fine, it's just I can't seem to get the WorkStationID param correct and as a result my BAQ Report is not printing from my button.

 

When I run a trace and print the report normally I find that the WorkStationID parameter is "TheNameOfMyMachine 9"  I need to know what the 9 is.  

 

I've seen many examples of how to do this across the UsersGroup, and it seems like nearly everyone hard-codes this number after Environment.MachineName i.e.:

 

dsPrintReport.Tables["BAQReportParam"].Rows[0]["WorkstationID"] = Environment.MachineName + " 9";

 

But I can't do this as the number changes, when using different logins etc.  I need some logic behind the number after the MachineName.  Can anyone tell me what it is?

 

Thank you all,

Chan