We do something like this in MES, except we create a Unique UD01
record each time the click OK. A tag just prints out and the user
really does nothing but click OK in report quantity. I have a
printer defined for each USER as their user ID then Pass the number
to bartender using script. They click OK and I pass the parameter to
Bartender. Here is the code I use. I am guessing this might work
for your situation also.
Private Sub btnOk_Click(ByVal Sender As Object, ByVal Args As
System.EventArgs) Handles btnOk.Click
Dim Printer As String = UDTagsForm.Session.UserID
Dim UDTags As EpiDataView = Ctype(oTrans.EPiDataViews
("UDTags"),EpiDataView)
Dim TagNumber As String = txtEpiCustom1.Text
Dim strPath As String = "C:\Progra~1\Seagull\BarTender\8.0
\bartend.exe"
Dim strParam As String = "/F=C:\Tags.btw /PRN= /P /X /?
TagNumber="&TagNumber
Dim strParam2 As String = strParam.Insert(20,Printer)
' msgbox(strParam2)
Process.Start(strPath, strParam2)
End Sub
--- In vantage@yahoogroups.com, "greg.deterding"
<greg.deterding@...> wrote:
record each time the click OK. A tag just prints out and the user
really does nothing but click OK in report quantity. I have a
printer defined for each USER as their user ID then Pass the number
to bartender using script. They click OK and I pass the parameter to
Bartender. Here is the code I use. I am guessing this might work
for your situation also.
Private Sub btnOk_Click(ByVal Sender As Object, ByVal Args As
System.EventArgs) Handles btnOk.Click
Dim Printer As String = UDTagsForm.Session.UserID
Dim UDTags As EpiDataView = Ctype(oTrans.EPiDataViews
("UDTags"),EpiDataView)
Dim TagNumber As String = txtEpiCustom1.Text
Dim strPath As String = "C:\Progra~1\Seagull\BarTender\8.0
\bartend.exe"
Dim strParam As String = "/F=C:\Tags.btw /PRN= /P /X /?
TagNumber="&TagNumber
Dim strParam2 As String = strParam.Insert(20,Printer)
' msgbox(strParam2)
Process.Start(strPath, strParam2)
End Sub
--- In vantage@yahoogroups.com, "greg.deterding"
<greg.deterding@...> wrote:
>like
> I need some VB help.
>
> short version:
> I need to program a button that will take data from a temp number
> field called RQ.CurrentQTY and put it into a user defined field
> JobHead.Number01. Is this possible? Can anyone help me with thecode?
>MES.
> Long version:
> We are trying to print material tags when quantity is reported in
> We need to have the end item part #, the material part #, and theneed
> current quantity reported on the label.
>
> There's a crystal report that uses an XML file with everything we
> including the temp field with the current quantity but we arehaving
> problems with it printing to out label printer. So I am now tryingit
> with Bartender and an auto print BAM.the
>
> Since Bartender can't use XML like crystal I'm setting up the data
> source through ODBC. Doing this means that I dont have access to
> temp field I need with the quantity. I am hoping that I canaccomplish
> 2 things with a custom button: A. passing the data from theBartender
> RQ.CurrentQTY field to JobHead.Number01 so I can get it in
> and B. checking a checkbox onother
> jobhead that will trigger the autoprint BAM.
>
> If anyone's even still with me I really appreciate it. Some coding
> help on this would also be greatly appreciated. Im open to any
> ideas that maybe wouldn't be so complicated.
>
> thanks,
>
> Greg
>