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)
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?
> > > > > >
> > > > >
> > > >
> > >
> >
>