Print labels from MES return materials

OK so I just couldn't get it to work that way so I decided to use bartender instead. I've got it working so that it launches the bartender label file to the prompt. I want to pass the part number from the return materials form to the prompt. The label file is ODBC. Can you tell me how to do this. Currently, my code looks like this.

Dim strPath As String = "bartend.exe"
Dim strParam As String = "/F=C:\PartLabel.btw /P /X"

Private Sub btnEpiCustom1_Click(ByVal Sender As Object, ByVal Args As System.EventArgs) Handles btnEpiCustom1.Click
'// ** Place Event Handling Code Here **

Process.Start(strPath, strParam)

--- In vantage@yahoogroups.com, "bw2868bond" <bwalker@...> wrote:
>
> I thought you already had defined a data view to work with
>
> Add the appropriate lines to your code
>
> Module Script
>
>
> '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
> '// Begin Wizard Added Module Level Variables **
>
> Private WithEvents IRView As EpiDataView
> '// End Wizard Added Module Level Variables **
>
>
> '// Add Custom Module Level Variables Here **
>
>
>
> Sub InitializeCustomCode()
>
>
> '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Intialization' lines **
> '// Begin Wizard Added Variable Intialization
>
> IRView = CType(oTrans.EpiDataViews("IR"), EpiDataView)
> '// End Wizard Added Variable Intialization
> '// Begin Custom Method Calls
>
> '// End Custom Method Calls
> End Sub
>
>
>
> Sub DestroyCustomCode()
>
>
> '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
> '// Begin Wizard Added Object Disposal
>
> IRView = Nothing
> '// End Wizard Added Object Disposal
> '// Begin Custom Code Disposal
>
> '// End Custom Code Disposal
> End Sub
>
> --- In vantage@yahoogroups.com, "jefferson112296" <jefferson112296@> wrote:
> >
> > Thanks, but I'm still getting an error message
> >
> > Error: BC30451 - line 66 (116) - Name 'IRView' is not declared.
> >
> > Any thoughts?
> >
> > --- In vantage@yahoogroups.com, "bw2868bond" <bwalker@> wrote:
> > >
> > > At the top, add this, if not already there...
> > >
> > > Imports System.Text
> > >
> > > --- In vantage@yahoogroups.com, "jefferson112296" <jefferson112296@> wrote:
> > > >
> > > > To be honest with you, this is all new to me. Here is what I did... but I'm probably way off here.
> > > >
> > > > Private Function getParametersForMtlTags() As String
> > > > Dim str As String = "~"
> > > > Dim builder As New StringBuilder(String.Empty)
> > > > builder.Append(IRView.dataView.Item(IRView.Row).Item("PartNum").ToString)
> > > > builder.Append(str)
> > > >
> > > > builder.Append(IRView.dataView.Item(IRView.Row).Item("PartPartDescription").ToString)
> > > > builder.Append(str)
> > > > builder.Append(IRView.dataView.Item(IRView.Row).Item("TranQty").ToString)
> > > > builder.Append(str)
> > > > builder.Append(IRView.dataView.Item(IRView.Row).Item("TranReference").ToString)
> > > > builder.Append(str)
> > > >
> > > > builder.Append(IRView.dataView.Item(IRView.Row).Item("TranDate").ToString)
> > > > builder.Append(str)
> > > > builder.Append(IRView.dataView.Item(IRView.Row).Item("UM").ToString)
> > > > builder.Append(str)
> > > > builder.Append(IRView.dataView.Item(IRView.Row).Item("FromJobNum").ToString)
> > > > builder.Append(str)
> > > >
> > > > End Function
> > > >
> > > >
> > > > Private Sub btnEpiCustom1_Click(ByVal Sender As Object, ByVal Args As System.EventArgs) Handles btnEpiCustom1.Click
> > > > '// ** Place Event Handling Code Here **
> > > >
> > > > Dim currentVal As String = getParametersForMtlTags()
> > > > ProcessCaller.LaunchForm(oTrans, "Epicor.Mfg.UIRpt.MtlTags", currentVal)
> > > >
> > > >
> > > > End Sub
> > > >
> > > >
> > > > ...and I'm getting the following message when I test the code...
> > > >
> > > > Error: BC30002 - line 62 (112) - Type 'StringBuilder' is not defined.
> > > > Error: BC30451 - line 63 (113) - Name 'IR' is not declared.
> > > > Error: BC30451 - line 63 (113) - Name 'IR' is not declared.
> > > > Error: BC30451 - line 66 (116) - Name 'IRView' is not declared.
> > > > Error: BC30451 - line 66 (116) - Name 'IRView' is not declared.
> > > > Error: BC30451 - line 68 (118) - Name 'irView' is not declared.
> > > > Error: BC30451 - line 68 (118) - Name 'irView' is not declared.
> > > > Error: BC30451 - line 70 (120) - Name 'irView' is not declared.
> > > > Error: BC30451 - line 70 (120) - Name 'irView' is not declared.
> > > > Error: BC30451 - line 73 (123) - Name 'irView' is not declared.
> > > > Error: BC30451 - line 73 (123) - Name 'irView' is not declared.
> > > > Error: BC30451 - line 75 (125) - Name 'irView' is not declared.
> > > > Error: BC30451 - line 75 (125) - Name 'irView' is not declared.
> > > >
> > > > Can you tell me what I'm doing wrong? -Jeff
> > > >
> > > > --- In vantage@yahoogroups.com, "bw2868bond" <bwalker@> wrote:
> > > > >
> > > > > It looks like you need to build a tilde '~' delimited list of values as the passed string to the MtlTags report.
> > > > >
> > > > > So, create a function to build the string, you will have to substitute values from the EpiDataView in the form...
> > > > >
> > > > > Private Function getParametersForMtlTags() As String
> > > > > Dim str As String = "~"
> > > > > Dim builder As New StringBuilder(String.Empty)
> > > > > builder.Append(rqView.dataView.Item(rqView.Row).Item("TagPart").ToString)
> > > > > builder.Append(str)
> > > > > builder.Append(rqView.dataView.Item(rqView.Row).Item("TagDescription").ToString)
> > > > > builder.Append(str)
> > > > > builder.Append(rqView.dataView.Item(rqView.Row).Item("CurrentQty").ToString)
> > > > > builder.Append(str)
> > > > > builder.Append(rqView.dataView.Item(rqView.Row).Item("TagType").ToString)
> > > > > builder.Append(str)
> > > > > builder.Append(rqView.dataView.Item(rqView.Row).Item("TagRevisionNum").ToString)
> > > > > builder.Append(str)
> > > > > builder.Append(rqView.dataView.Item(rqView.Row).Item("TagIUM").ToString)
> > > > > builder.Append(str)
> > > > > builder.Append(rqView.dataView.Item(rqView.Row).Item("JobNum").ToString)
> > > > > builder.Append(str)
> > > > > builder.Append(Me.rqView.dataView.Item(Me.rqView.Row).Item("AssemblySeq").ToString)
> > > > > builder.Append(str)
> > > > > builder.Append(rqView.dataView.Item(rqView.Row).Item("OprSeq").ToString)
> > > > > builder.Append(str)
> > > > > builder.Append(rqView.dataView.Item(rqView.Row).Item("TagInputWhse").ToString)
> > > > > builder.Append(str)
> > > > > builder.Append(rqView.dataView.Item(rqView.Row).Item("TagInputBinNum").ToString)
> > > > > Return builder.ToString
> > > > > End Function
> > > > >
> > > > > Then in your button click event you can do this:
> > > > >
> > > > > Dim currentVal As String = getParametersForMtlTags()
> > > > > ProcessCaller.LaunchForm(oTrans, "Epicor.Mfg.UIRpt.MtlTags", currentVal)
> > > > >
> > > > >
> > > > > Good Luck....
> > > > >
> > > > > bw
> > > > >
> > > > >
> > > > > --- In vantage@yahoogroups.com, "jefferson112296" <jefferson112296@> wrote:
> > > > > >
> > > > > > I created a custom "Print Tags" button on the MES return materials form to launch the MtlTags. The button launches the MtlTags form which I want to use to print labels (just like on the Report Quantity form). I can't figure out how to pass parameters from the return material form to the MtlTags form so I can actually print the labels. Does anyone know the script I would need to put into the script editor?
> > > > > >
> > > > >
> > > >
> > >
> >
>
I created a custom "Print Tags" button on the MES return materials form to launch the MtlTags. The button launches the MtlTags form which I want to use to print labels (just like on the Report Quantity form). I can't figure out how to pass parameters from the return material form to the MtlTags form so I can actually print the labels. Does anyone know the script I would need to put into the script editor?
I haven't had to update our price list in 13 months - What is the trick...? I remember that it thinks locally or something, so when I go to Export the file, I need to... (Argh-feeling my age right now)

Cheryl Elliott
Trans Tech
what version...if you click the import/export filename button; you can take it where you want it. But I know at a certain version; you could only import/export from the server and it was at the server desktop

C:\Users\Administrator\Desktop\export.csv
----- Original Message -----
From: Cheryl Elliott
To: vantage@yahoogroups.com
Sent: Thursday, September 03, 2009 5:06 PM
Subject: RE: [Vantage] What is the trick for Price List export?


I haven't had to update our price list in 13 months - What is the trick...? I remember that it thinks locally or something, so when I go to Export the file, I need to... (Argh-feeling my age right now)

Cheryl Elliott
Trans Tech





[Non-text portions of this message have been removed]
I export / import the price list from my client machine, just make sure
you have the patch set as a UNC path, don't use drive letters or mapped
drives, Vantage assumes you are at the server so by using c:.... it will
drop it on the server c: drive. not your local c: drive

What i do is use \\"server name"\etc..... as long as you have access to
where you put the file you should be fine

Hope this helps.

Mark Lawrence
Teagle Machinery Ltd
Vantage 8.03.405a
--- In vantage@yahoogroups.com, "advantage" <advantage@...> wrote:
>
> what version...if you click the import/export filename button; you can
take it where you want it. But I know at a certain version; you could
only import/export from the server and it was at the server desktop
>
> C:\Users\Administrator\Desktop\export.csv
> ----- Original Message -----
> From: Cheryl Elliott
> To: vantage@yahoogroups.com
> Sent: Thursday, September 03, 2009 5:06 PM
> Subject: RE: [Vantage] What is the trick for Price List export?
>
>
> I haven't had to update our price list in 13 months - What is the
trick...? I remember that it thinks locally or something, so when I go
to Export the file, I need to... (Argh-feeling my age right now)
>
> Cheryl Elliott
> Trans Tech
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
Ahh yes that is what I forgot thanks mark
Sent from my Verizon Wireless BlackBerry

-----Original Message-----
From: "teaglem" <teaglem@...>

Date: Fri, 04 Sep 2009 07:30:48
To: <vantage@yahoogroups.com>
Subject: [Vantage] Re: What is the trick for Price List export?


I export / import the price list from my client machine, just make sure
you have the patch set as a UNC path, don't use drive letters or mapped
drives, Vantage assumes you are at the server so by using c:.... it will
drop it on the server c: drive. not your local c: drive

What i do is use \\"server name"\etc..... as long as you have access to
where you put the file you should be fine

Hope this helps.

Mark Lawrence
Teagle Machinery Ltd
Vantage 8.03.405a
--- In vantage@yahoogroups.com, "advantage" <advantage@...> wrote:
>
> what version...if you click the import/export filename button; you can
take it where you want it. But I know at a certain version; you could
only import/export from the server and it was at the server desktop
>
> C:\Users\Administrator\Desktop\export.csv
> ----- Original Message -----
> From: Cheryl Elliott
> To: vantage@yahoogroups.com
> Sent: Thursday, September 03, 2009 5:06 PM
> Subject: RE: [Vantage] What is the trick for Price List export?
>
>
> I haven't had to update our price list in 13 months - What is the
trick...? I remember that it thinks locally or something, so when I go
to Export the file, I need to... (Argh-feeling my age right now)
>
> Cheryl Elliott
> Trans Tech
>
>
>
>
>
> [Non-text portions of this message have been removed]
>





[Non-text portions of this message have been removed]
It looks like you need to build a tilde '~' delimited list of values as the passed string to the MtlTags report.

So, create a function to build the string, you will have to substitute values from the EpiDataView in the form...

Private Function getParametersForMtlTags() As String
Dim str As String = "~"
Dim builder As New StringBuilder(String.Empty)
builder.Append(rqView.dataView.Item(rqView.Row).Item("TagPart").ToString)
builder.Append(str)
builder.Append(rqView.dataView.Item(rqView.Row).Item("TagDescription").ToString)
builder.Append(str)
builder.Append(rqView.dataView.Item(rqView.Row).Item("CurrentQty").ToString)
builder.Append(str)
builder.Append(rqView.dataView.Item(rqView.Row).Item("TagType").ToString)
builder.Append(str)
builder.Append(rqView.dataView.Item(rqView.Row).Item("TagRevisionNum").ToString)
builder.Append(str)
builder.Append(rqView.dataView.Item(rqView.Row).Item("TagIUM").ToString)
builder.Append(str)
builder.Append(rqView.dataView.Item(rqView.Row).Item("JobNum").ToString)
builder.Append(str)
builder.Append(Me.rqView.dataView.Item(Me.rqView.Row).Item("AssemblySeq").ToString)
builder.Append(str)
builder.Append(rqView.dataView.Item(rqView.Row).Item("OprSeq").ToString)
builder.Append(str)
builder.Append(rqView.dataView.Item(rqView.Row).Item("TagInputWhse").ToString)
builder.Append(str)
builder.Append(rqView.dataView.Item(rqView.Row).Item("TagInputBinNum").ToString)
Return builder.ToString
End Function

Then in your button click event you can do this:

Dim currentVal As String = getParametersForMtlTags()
ProcessCaller.LaunchForm(oTrans, "Epicor.Mfg.UIRpt.MtlTags", currentVal)


Good Luck....

bw


--- In vantage@yahoogroups.com, "jefferson112296" <jefferson112296@...> wrote:
>
> I created a custom "Print Tags" button on the MES return materials form to launch the MtlTags. The button launches the MtlTags form which I want to use to print labels (just like on the Report Quantity form). I can't figure out how to pass parameters from the return material form to the MtlTags form so I can actually print the labels. Does anyone know the script I would need to put into the script editor?
>
To be honest with you, this is all new to me. Here is what I did... but I'm probably way off here.

Private Function getParametersForMtlTags() As String
Dim str As String = "~"
Dim builder As New StringBuilder(String.Empty)
builder.Append(IRView.dataView.Item(IRView.Row).Item("PartNum").ToString)
builder.Append(str)

builder.Append(IRView.dataView.Item(IRView.Row).Item("PartPartDescription").ToString)
builder.Append(str)
builder.Append(IRView.dataView.Item(IRView.Row).Item("TranQty").ToString)
builder.Append(str)
builder.Append(IRView.dataView.Item(IRView.Row).Item("TranReference").ToString)
builder.Append(str)

builder.Append(IRView.dataView.Item(IRView.Row).Item("TranDate").ToString)
builder.Append(str)
builder.Append(IRView.dataView.Item(IRView.Row).Item("UM").ToString)
builder.Append(str)
builder.Append(IRView.dataView.Item(IRView.Row).Item("FromJobNum").ToString)
builder.Append(str)

End Function


Private Sub btnEpiCustom1_Click(ByVal Sender As Object, ByVal Args As System.EventArgs) Handles btnEpiCustom1.Click
'// ** Place Event Handling Code Here **

Dim currentVal As String = getParametersForMtlTags()
ProcessCaller.LaunchForm(oTrans, "Epicor.Mfg.UIRpt.MtlTags", currentVal)


End Sub


...and I'm getting the following message when I test the code...

Error: BC30002 - line 62 (112) - Type 'StringBuilder' is not defined.
Error: BC30451 - line 63 (113) - Name 'IR' is not declared.
Error: BC30451 - line 63 (113) - Name 'IR' is not declared.
Error: BC30451 - line 66 (116) - Name 'IRView' is not declared.
Error: BC30451 - line 66 (116) - Name 'IRView' is not declared.
Error: BC30451 - line 68 (118) - Name 'irView' is not declared.
Error: BC30451 - line 68 (118) - Name 'irView' is not declared.
Error: BC30451 - line 70 (120) - Name 'irView' is not declared.
Error: BC30451 - line 70 (120) - Name 'irView' is not declared.
Error: BC30451 - line 73 (123) - Name 'irView' is not declared.
Error: BC30451 - line 73 (123) - Name 'irView' is not declared.
Error: BC30451 - line 75 (125) - Name 'irView' is not declared.
Error: BC30451 - line 75 (125) - Name 'irView' is not declared.

Can you tell me what I'm doing wrong? -Jeff

--- In vantage@yahoogroups.com, "bw2868bond" <bwalker@...> wrote:
>
> It looks like you need to build a tilde '~' delimited list of values as the passed string to the MtlTags report.
>
> So, create a function to build the string, you will have to substitute values from the EpiDataView in the form...
>
> Private Function getParametersForMtlTags() As String
> Dim str As String = "~"
> Dim builder As New StringBuilder(String.Empty)
> builder.Append(rqView.dataView.Item(rqView.Row).Item("TagPart").ToString)
> builder.Append(str)
> builder.Append(rqView.dataView.Item(rqView.Row).Item("TagDescription").ToString)
> builder.Append(str)
> builder.Append(rqView.dataView.Item(rqView.Row).Item("CurrentQty").ToString)
> builder.Append(str)
> builder.Append(rqView.dataView.Item(rqView.Row).Item("TagType").ToString)
> builder.Append(str)
> builder.Append(rqView.dataView.Item(rqView.Row).Item("TagRevisionNum").ToString)
> builder.Append(str)
> builder.Append(rqView.dataView.Item(rqView.Row).Item("TagIUM").ToString)
> builder.Append(str)
> builder.Append(rqView.dataView.Item(rqView.Row).Item("JobNum").ToString)
> builder.Append(str)
> builder.Append(Me.rqView.dataView.Item(Me.rqView.Row).Item("AssemblySeq").ToString)
> builder.Append(str)
> builder.Append(rqView.dataView.Item(rqView.Row).Item("OprSeq").ToString)
> builder.Append(str)
> builder.Append(rqView.dataView.Item(rqView.Row).Item("TagInputWhse").ToString)
> builder.Append(str)
> builder.Append(rqView.dataView.Item(rqView.Row).Item("TagInputBinNum").ToString)
> Return builder.ToString
> End Function
>
> Then in your button click event you can do this:
>
> Dim currentVal As String = getParametersForMtlTags()
> ProcessCaller.LaunchForm(oTrans, "Epicor.Mfg.UIRpt.MtlTags", currentVal)
>
>
> Good Luck....
>
> bw
>
>
> --- In vantage@yahoogroups.com, "jefferson112296" <jefferson112296@> wrote:
> >
> > I created a custom "Print Tags" button on the MES return materials form to launch the MtlTags. The button launches the MtlTags form which I want to use to print labels (just like on the Report Quantity form). I can't figure out how to pass parameters from the return material form to the MtlTags form so I can actually print the labels. Does anyone know the script I would need to put into the script editor?
> >
>
At the top, add this, if not already there...

Imports System.Text

--- In vantage@yahoogroups.com, "jefferson112296" <jefferson112296@...> wrote:
>
> To be honest with you, this is all new to me. Here is what I did... but I'm probably way off here.
>
> Private Function getParametersForMtlTags() As String
> Dim str As String = "~"
> Dim builder As New StringBuilder(String.Empty)
> builder.Append(IRView.dataView.Item(IRView.Row).Item("PartNum").ToString)
> builder.Append(str)
>
> builder.Append(IRView.dataView.Item(IRView.Row).Item("PartPartDescription").ToString)
> builder.Append(str)
> builder.Append(IRView.dataView.Item(IRView.Row).Item("TranQty").ToString)
> builder.Append(str)
> builder.Append(IRView.dataView.Item(IRView.Row).Item("TranReference").ToString)
> builder.Append(str)
>
> builder.Append(IRView.dataView.Item(IRView.Row).Item("TranDate").ToString)
> builder.Append(str)
> builder.Append(IRView.dataView.Item(IRView.Row).Item("UM").ToString)
> builder.Append(str)
> builder.Append(IRView.dataView.Item(IRView.Row).Item("FromJobNum").ToString)
> builder.Append(str)
>
> End Function
>
>
> Private Sub btnEpiCustom1_Click(ByVal Sender As Object, ByVal Args As System.EventArgs) Handles btnEpiCustom1.Click
> '// ** Place Event Handling Code Here **
>
> Dim currentVal As String = getParametersForMtlTags()
> ProcessCaller.LaunchForm(oTrans, "Epicor.Mfg.UIRpt.MtlTags", currentVal)
>
>
> End Sub
>
>
> ...and I'm getting the following message when I test the code...
>
> Error: BC30002 - line 62 (112) - Type 'StringBuilder' is not defined.
> Error: BC30451 - line 63 (113) - Name 'IR' is not declared.
> Error: BC30451 - line 63 (113) - Name 'IR' is not declared.
> Error: BC30451 - line 66 (116) - Name 'IRView' is not declared.
> Error: BC30451 - line 66 (116) - Name 'IRView' is not declared.
> Error: BC30451 - line 68 (118) - Name 'irView' is not declared.
> Error: BC30451 - line 68 (118) - Name 'irView' is not declared.
> Error: BC30451 - line 70 (120) - Name 'irView' is not declared.
> Error: BC30451 - line 70 (120) - Name 'irView' is not declared.
> Error: BC30451 - line 73 (123) - Name 'irView' is not declared.
> Error: BC30451 - line 73 (123) - Name 'irView' is not declared.
> Error: BC30451 - line 75 (125) - Name 'irView' is not declared.
> Error: BC30451 - line 75 (125) - Name 'irView' is not declared.
>
> Can you tell me what I'm doing wrong? -Jeff
>
> --- In vantage@yahoogroups.com, "bw2868bond" <bwalker@> wrote:
> >
> > It looks like you need to build a tilde '~' delimited list of values as the passed string to the MtlTags report.
> >
> > So, create a function to build the string, you will have to substitute values from the EpiDataView in the form...
> >
> > Private Function getParametersForMtlTags() As String
> > Dim str As String = "~"
> > Dim builder As New StringBuilder(String.Empty)
> > builder.Append(rqView.dataView.Item(rqView.Row).Item("TagPart").ToString)
> > builder.Append(str)
> > builder.Append(rqView.dataView.Item(rqView.Row).Item("TagDescription").ToString)
> > builder.Append(str)
> > builder.Append(rqView.dataView.Item(rqView.Row).Item("CurrentQty").ToString)
> > builder.Append(str)
> > builder.Append(rqView.dataView.Item(rqView.Row).Item("TagType").ToString)
> > builder.Append(str)
> > builder.Append(rqView.dataView.Item(rqView.Row).Item("TagRevisionNum").ToString)
> > builder.Append(str)
> > builder.Append(rqView.dataView.Item(rqView.Row).Item("TagIUM").ToString)
> > builder.Append(str)
> > builder.Append(rqView.dataView.Item(rqView.Row).Item("JobNum").ToString)
> > builder.Append(str)
> > builder.Append(Me.rqView.dataView.Item(Me.rqView.Row).Item("AssemblySeq").ToString)
> > builder.Append(str)
> > builder.Append(rqView.dataView.Item(rqView.Row).Item("OprSeq").ToString)
> > builder.Append(str)
> > builder.Append(rqView.dataView.Item(rqView.Row).Item("TagInputWhse").ToString)
> > builder.Append(str)
> > builder.Append(rqView.dataView.Item(rqView.Row).Item("TagInputBinNum").ToString)
> > Return builder.ToString
> > End Function
> >
> > Then in your button click event you can do this:
> >
> > Dim currentVal As String = getParametersForMtlTags()
> > ProcessCaller.LaunchForm(oTrans, "Epicor.Mfg.UIRpt.MtlTags", currentVal)
> >
> >
> > Good Luck....
> >
> > bw
> >
> >
> > --- In vantage@yahoogroups.com, "jefferson112296" <jefferson112296@> wrote:
> > >
> > > I created a custom "Print Tags" button on the MES return materials form to launch the MtlTags. The button launches the MtlTags form which I want to use to print labels (just like on the Report Quantity form). I can't figure out how to pass parameters from the return material form to the MtlTags form so I can actually print the labels. Does anyone know the script I would need to put into the script editor?
> > >
> >
>
Thanks, but I'm still getting an error message

Error: BC30451 - line 66 (116) - Name 'IRView' is not declared.

Any thoughts?

--- In vantage@yahoogroups.com, "bw2868bond" <bwalker@...> wrote:
>
> At the top, add this, if not already there...
>
> Imports System.Text
>
> --- In vantage@yahoogroups.com, "jefferson112296" <jefferson112296@> wrote:
> >
> > To be honest with you, this is all new to me. Here is what I did... but I'm probably way off here.
> >
> > Private Function getParametersForMtlTags() As String
> > Dim str As String = "~"
> > Dim builder As New StringBuilder(String.Empty)
> > builder.Append(IRView.dataView.Item(IRView.Row).Item("PartNum").ToString)
> > builder.Append(str)
> >
> > builder.Append(IRView.dataView.Item(IRView.Row).Item("PartPartDescription").ToString)
> > builder.Append(str)
> > builder.Append(IRView.dataView.Item(IRView.Row).Item("TranQty").ToString)
> > builder.Append(str)
> > builder.Append(IRView.dataView.Item(IRView.Row).Item("TranReference").ToString)
> > builder.Append(str)
> >
> > builder.Append(IRView.dataView.Item(IRView.Row).Item("TranDate").ToString)
> > builder.Append(str)
> > builder.Append(IRView.dataView.Item(IRView.Row).Item("UM").ToString)
> > builder.Append(str)
> > builder.Append(IRView.dataView.Item(IRView.Row).Item("FromJobNum").ToString)
> > builder.Append(str)
> >
> > End Function
> >
> >
> > Private Sub btnEpiCustom1_Click(ByVal Sender As Object, ByVal Args As System.EventArgs) Handles btnEpiCustom1.Click
> > '// ** Place Event Handling Code Here **
> >
> > Dim currentVal As String = getParametersForMtlTags()
> > ProcessCaller.LaunchForm(oTrans, "Epicor.Mfg.UIRpt.MtlTags", currentVal)
> >
> >
> > End Sub
> >
> >
> > ...and I'm getting the following message when I test the code...
> >
> > Error: BC30002 - line 62 (112) - Type 'StringBuilder' is not defined.
> > Error: BC30451 - line 63 (113) - Name 'IR' is not declared.
> > Error: BC30451 - line 63 (113) - Name 'IR' is not declared.
> > Error: BC30451 - line 66 (116) - Name 'IRView' is not declared.
> > Error: BC30451 - line 66 (116) - Name 'IRView' is not declared.
> > Error: BC30451 - line 68 (118) - Name 'irView' is not declared.
> > Error: BC30451 - line 68 (118) - Name 'irView' is not declared.
> > Error: BC30451 - line 70 (120) - Name 'irView' is not declared.
> > Error: BC30451 - line 70 (120) - Name 'irView' is not declared.
> > Error: BC30451 - line 73 (123) - Name 'irView' is not declared.
> > Error: BC30451 - line 73 (123) - Name 'irView' is not declared.
> > Error: BC30451 - line 75 (125) - Name 'irView' is not declared.
> > Error: BC30451 - line 75 (125) - Name 'irView' is not declared.
> >
> > Can you tell me what I'm doing wrong? -Jeff
> >
> > --- In vantage@yahoogroups.com, "bw2868bond" <bwalker@> wrote:
> > >
> > > It looks like you need to build a tilde '~' delimited list of values as the passed string to the MtlTags report.
> > >
> > > So, create a function to build the string, you will have to substitute values from the EpiDataView in the form...
> > >
> > > Private Function getParametersForMtlTags() As String
> > > Dim str As String = "~"
> > > Dim builder As New StringBuilder(String.Empty)
> > > builder.Append(rqView.dataView.Item(rqView.Row).Item("TagPart").ToString)
> > > builder.Append(str)
> > > builder.Append(rqView.dataView.Item(rqView.Row).Item("TagDescription").ToString)
> > > builder.Append(str)
> > > builder.Append(rqView.dataView.Item(rqView.Row).Item("CurrentQty").ToString)
> > > builder.Append(str)
> > > builder.Append(rqView.dataView.Item(rqView.Row).Item("TagType").ToString)
> > > builder.Append(str)
> > > builder.Append(rqView.dataView.Item(rqView.Row).Item("TagRevisionNum").ToString)
> > > builder.Append(str)
> > > builder.Append(rqView.dataView.Item(rqView.Row).Item("TagIUM").ToString)
> > > builder.Append(str)
> > > builder.Append(rqView.dataView.Item(rqView.Row).Item("JobNum").ToString)
> > > builder.Append(str)
> > > builder.Append(Me.rqView.dataView.Item(Me.rqView.Row).Item("AssemblySeq").ToString)
> > > builder.Append(str)
> > > builder.Append(rqView.dataView.Item(rqView.Row).Item("OprSeq").ToString)
> > > builder.Append(str)
> > > builder.Append(rqView.dataView.Item(rqView.Row).Item("TagInputWhse").ToString)
> > > builder.Append(str)
> > > builder.Append(rqView.dataView.Item(rqView.Row).Item("TagInputBinNum").ToString)
> > > Return builder.ToString
> > > End Function
> > >
> > > Then in your button click event you can do this:
> > >
> > > Dim currentVal As String = getParametersForMtlTags()
> > > ProcessCaller.LaunchForm(oTrans, "Epicor.Mfg.UIRpt.MtlTags", currentVal)
> > >
> > >
> > > Good Luck....
> > >
> > > bw
> > >
> > >
> > > --- In vantage@yahoogroups.com, "jefferson112296" <jefferson112296@> wrote:
> > > >
> > > > I created a custom "Print Tags" button on the MES return materials form to launch the MtlTags. The button launches the MtlTags form which I want to use to print labels (just like on the Report Quantity form). I can't figure out how to pass parameters from the return material form to the MtlTags form so I can actually print the labels. Does anyone know the script I would need to put into the script editor?
> > > >
> > >
> >
>
I thought you already had defined a data view to work with

Add the appropriate lines to your code

Module Script


'// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
'// Begin Wizard Added Module Level Variables **

Private WithEvents IRView As EpiDataView
'// End Wizard Added Module Level Variables **


'// Add Custom Module Level Variables Here **



Sub InitializeCustomCode()


'// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Intialization' lines **
'// Begin Wizard Added Variable Intialization

IRView = CType(oTrans.EpiDataViews("IR"), EpiDataView)
'// End Wizard Added Variable Intialization
'// Begin Custom Method Calls

'// End Custom Method Calls
End Sub



Sub DestroyCustomCode()


'// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
'// Begin Wizard Added Object Disposal

IRView = Nothing
'// End Wizard Added Object Disposal
'// Begin Custom Code Disposal

'// End Custom Code Disposal
End Sub

--- In vantage@yahoogroups.com, "jefferson112296" <jefferson112296@...> wrote:
>
> Thanks, but I'm still getting an error message
>
> Error: BC30451 - line 66 (116) - Name 'IRView' is not declared.
>
> Any thoughts?
>
> --- In vantage@yahoogroups.com, "bw2868bond" <bwalker@> wrote:
> >
> > At the top, add this, if not already there...
> >
> > Imports System.Text
> >
> > --- In vantage@yahoogroups.com, "jefferson112296" <jefferson112296@> wrote:
> > >
> > > To be honest with you, this is all new to me. Here is what I did... but I'm probably way off here.
> > >
> > > Private Function getParametersForMtlTags() As String
> > > Dim str As String = "~"
> > > Dim builder As New StringBuilder(String.Empty)
> > > builder.Append(IRView.dataView.Item(IRView.Row).Item("PartNum").ToString)
> > > builder.Append(str)
> > >
> > > builder.Append(IRView.dataView.Item(IRView.Row).Item("PartPartDescription").ToString)
> > > builder.Append(str)
> > > builder.Append(IRView.dataView.Item(IRView.Row).Item("TranQty").ToString)
> > > builder.Append(str)
> > > builder.Append(IRView.dataView.Item(IRView.Row).Item("TranReference").ToString)
> > > builder.Append(str)
> > >
> > > builder.Append(IRView.dataView.Item(IRView.Row).Item("TranDate").ToString)
> > > builder.Append(str)
> > > builder.Append(IRView.dataView.Item(IRView.Row).Item("UM").ToString)
> > > builder.Append(str)
> > > builder.Append(IRView.dataView.Item(IRView.Row).Item("FromJobNum").ToString)
> > > builder.Append(str)
> > >
> > > End Function
> > >
> > >
> > > Private Sub btnEpiCustom1_Click(ByVal Sender As Object, ByVal Args As System.EventArgs) Handles btnEpiCustom1.Click
> > > '// ** Place Event Handling Code Here **
> > >
> > > Dim currentVal As String = getParametersForMtlTags()
> > > ProcessCaller.LaunchForm(oTrans, "Epicor.Mfg.UIRpt.MtlTags", currentVal)
> > >
> > >
> > > End Sub
> > >
> > >
> > > ...and I'm getting the following message when I test the code...
> > >
> > > Error: BC30002 - line 62 (112) - Type 'StringBuilder' is not defined.
> > > Error: BC30451 - line 63 (113) - Name 'IR' is not declared.
> > > Error: BC30451 - line 63 (113) - Name 'IR' is not declared.
> > > Error: BC30451 - line 66 (116) - Name 'IRView' is not declared.
> > > Error: BC30451 - line 66 (116) - Name 'IRView' is not declared.
> > > Error: BC30451 - line 68 (118) - Name 'irView' is not declared.
> > > Error: BC30451 - line 68 (118) - Name 'irView' is not declared.
> > > Error: BC30451 - line 70 (120) - Name 'irView' is not declared.
> > > Error: BC30451 - line 70 (120) - Name 'irView' is not declared.
> > > Error: BC30451 - line 73 (123) - Name 'irView' is not declared.
> > > Error: BC30451 - line 73 (123) - Name 'irView' is not declared.
> > > Error: BC30451 - line 75 (125) - Name 'irView' is not declared.
> > > Error: BC30451 - line 75 (125) - Name 'irView' is not declared.
> > >
> > > Can you tell me what I'm doing wrong? -Jeff
> > >
> > > --- In vantage@yahoogroups.com, "bw2868bond" <bwalker@> wrote:
> > > >
> > > > It looks like you need to build a tilde '~' delimited list of values as the passed string to the MtlTags report.
> > > >
> > > > So, create a function to build the string, you will have to substitute values from the EpiDataView in the form...
> > > >
> > > > Private Function getParametersForMtlTags() As String
> > > > Dim str As String = "~"
> > > > Dim builder As New StringBuilder(String.Empty)
> > > > builder.Append(rqView.dataView.Item(rqView.Row).Item("TagPart").ToString)
> > > > builder.Append(str)
> > > > builder.Append(rqView.dataView.Item(rqView.Row).Item("TagDescription").ToString)
> > > > builder.Append(str)
> > > > builder.Append(rqView.dataView.Item(rqView.Row).Item("CurrentQty").ToString)
> > > > builder.Append(str)
> > > > builder.Append(rqView.dataView.Item(rqView.Row).Item("TagType").ToString)
> > > > builder.Append(str)
> > > > builder.Append(rqView.dataView.Item(rqView.Row).Item("TagRevisionNum").ToString)
> > > > builder.Append(str)
> > > > builder.Append(rqView.dataView.Item(rqView.Row).Item("TagIUM").ToString)
> > > > builder.Append(str)
> > > > builder.Append(rqView.dataView.Item(rqView.Row).Item("JobNum").ToString)
> > > > builder.Append(str)
> > > > builder.Append(Me.rqView.dataView.Item(Me.rqView.Row).Item("AssemblySeq").ToString)
> > > > builder.Append(str)
> > > > builder.Append(rqView.dataView.Item(rqView.Row).Item("OprSeq").ToString)
> > > > builder.Append(str)
> > > > builder.Append(rqView.dataView.Item(rqView.Row).Item("TagInputWhse").ToString)
> > > > builder.Append(str)
> > > > builder.Append(rqView.dataView.Item(rqView.Row).Item("TagInputBinNum").ToString)
> > > > Return builder.ToString
> > > > End Function
> > > >
> > > > Then in your button click event you can do this:
> > > >
> > > > Dim currentVal As String = getParametersForMtlTags()
> > > > ProcessCaller.LaunchForm(oTrans, "Epicor.Mfg.UIRpt.MtlTags", currentVal)
> > > >
> > > >
> > > > Good Luck....
> > > >
> > > > bw
> > > >
> > > >
> > > > --- In vantage@yahoogroups.com, "jefferson112296" <jefferson112296@> wrote:
> > > > >
> > > > > I created a custom "Print Tags" button on the MES return materials form to launch the MtlTags. The button launches the MtlTags form which I want to use to print labels (just like on the Report Quantity form). I can't figure out how to pass parameters from the return material form to the MtlTags form so I can actually print the labels. Does anyone know the script I would need to put into the script editor?
> > > > >
> > > >
> > >
> >
>