BOM on the SO/PS/Invoice

We did have the same problem when it hit crystal. I can't recall which font we went with, but we found a fixed width font that worked for us. I'll have to change the comments field so it looks good on the screen as well.

Ken

________________________________

From: vantage@yahoogroups.com on behalf of Charles Carden
Sent: Wed 8/13/2008 6:08 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Re: BOM on the SO/PS/Invoice



Change the font in your comments field to a fixed width font like courier new and it will look great. I'm surprised you don't have the same problem when it hits Crystal. Typically variable pitched fonts like Arial and Times New Roman don't work well for this type of coding unless you use tabs to control the spacing. I'm not sure what the tab spacing is in Vantage or Crystal but yes, they can be difficult to control unless you know exactly what they are. If the tab spacing is different in the two applications it becomes almost impossible to format effectively.

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On Behalf Of Ken Williams
Sent: Wednesday, August 13, 2008 6:39 AM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] Re: BOM on the SO/PS/Invoice

Well sheesh, if you want to take the fun out of a bunch of if/then & for loops :).

Thanks for the tip, nice handy command to have.

Ken

________________________________

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> on behalf of bw2868bond
Sent: Wed 8/13/2008 4:40 AM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Re: BOM on the SO/PS/Invoice

Thanks for sharing. :)

Ever look at PadRight() ?

bw

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> , "Ken Williams" <ken@...> wrote:
>
> I thought I'd follow up with a customization we knocked out in a
few hours today to get what we want....well mostly, we'll probably
modify it to look up the customer price list in the future. One side
question, is there a way to have a whereclause with two clauses? We
were originally trying to tackle this issue a harder way, but I can
see we may want to use two clauses in the future. For instance,
perhaps jobnum & mtlseq for the example below (our original hard way
of thinking about it).
>
> For further detail below, we opted to use spaces to control the
output to Crystal (as opposed to tabs, we couldn't control tabs as
well as spaces). The below doesn't necessarily look great on the
screen, but it looks perfect for the customer on all the paperwork.
I'm interested in any comments, this was literally scrapped together
in less than 2 hours this afternoon, so I'm sure there's room for
improvement/optimization.
>
> Anyway, we added a button called btnBOM, below is the sub-routine
run when the button is clicked:
>
> Private Sub btnBOM_Click(ByVal Sender As Object, ByVal Args As
System.EventArgs) Handles btnBOM.Click
> '// ** Place Event Handling Code Here **
> Dim edv As EpiDataView = CType(oTrans.EpiDataViews
("JobProd"), EpiDataView) 'jobproduction table lookup
> Dim edvJO as string = edv.dataView(edv.row)
("JobNum") 'return just related job number
> Dim recSelected as boolean 'true/false flag
> Dim whereClause as string ="JobNum ='" & edvJO & "'" 'where
clause
> Dim dsJob as DataSet =
Epicor.Mfg.UI.FormFunctions.SearchFunctions.listLookup
(oTrans,"JobMtlSearchAdapter",recSelected,False,whereClause)
> Dim nummtlitems as integer
> Dim x as integer = 0
> Dim comment As String
> comment = "LABOR"
& "
"
> comment = comment & "$" & Chr(13) & Chr(10)
> if recSelected = true 'don't do anything if there are no
materials
> nummtlitems=(dsJob.Tables(0).Rows.Count)
> for x=0 to nummtlitems-1
> Dim PartLen As Integer = 0
> Dim DescLen As Integer = 0
> Dim QtyLen As Integer = 0
> Dim PartSpaceLeft As Integer = 0
> Dim DescSpaceLeft As Integer = 0
> Dim QtySpaceLeft As Integer = 0
> Dim GoodPart As String = ""
> Dim GoodDesc As String = ""
>
> Dim PartSpace As String = ""
> Dim DescSpace As String = ""
> Dim QtySpace As String = ""
> Dim Part As String = ""
> Dim Desc As String = ""
> Dim Qty As String = ""
> Dim UM As String = ""
> Dim i As Integer = 0
> Dim j As Integer = 0
> Dim k As Integer = 0
>
> Part = dsJob.Tables(0).Rows(x)("PartNum")
> Desc = dsJob.Tables(0).Rows(x)("Description")
> Qty = dsJob.Tables(0).Rows(x)("QtyPer")
> UM = dsJob.Tables(0).Rows(x)("IUM")
>
>
> PartLen = Len(dsJob.Tables(0).Rows(x)("PartNum"))
> If PartLen > 25 Then
> Partlen = 25
> Else
> PartLen = Len(dsJob.Tables(0).Rows(x)("PartNum"))
> End If
> DescLen = Len(dsJob.Tables(0).Rows(x)("Description"))
> If DescLen > 40 Then
> DescLen = 40
> Else
> DescLen = Len(dsJob.Tables(0).Rows(x)("Description"))
> End If
> QtyLen = Len(dsJob.Tables(0).Rows(x)("QtyPer"))
> PartSpaceLeft = 25 - PartLen
> DescSpaceLeft = 40 - DescLen
> QtySpaceLeft = 24 - QtyLen
>
> If PartSpaceLeft = 0 Then
> PartSpaceLeft = ""
> Else
> For i = 1 To PartSpaceLeft
> PartSpace = PartSpace & " "
> Next i
> End If
>
> If DescSpaceLeft = 0 Then
> DescSpaceLeft = ""
> Else
> For j = 1 To DescSpaceLeft
> DescSpace = DescSpace & " "
> Next j
> End If
> If QtySpaceLeft = 0 Then
> QtySpaceLeft = ""
> Else
> For k = 1 To QtySpaceLeft
> QtySpace = QtySpace & " "
> Next k
> End If
> Part = left(Part,25)
> Desc = left(Desc,40)
> Qty = left(Qty,8)
>
> comment = comment & Part & PartSpace & Desc & DescSpace
> comment = comment & Qty & UM & QtySpace & "$" & CHR(13) &
CHR(10)
>
> next x
> txtSalesOrderComment.Text = comment
> end if
>
> End Sub
>
> ________________________________
>
> From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> on behalf of Ken Williams
> Sent: Thu 7/17/2008 4:00 PM
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
> Subject: RE: [Vantage] BOM on the SO/PS/Invoice
>
>
>
> They want a material breakdown with their costs (thus the link to
the customer price list).
>
> The problem with a print screen is volume. We literally do a
thousand or so jobs a month, and to put a step in of printscreen of a
BOM is both burdensome and not overly professional. Was hoping to
have it on the same page (thus a subreport) that is done via a
checkmark.
>
> ________________________________
>
> From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
on behalf of Manasa Reddy
> Sent: Thu 7/17/2008 3:34 PM
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
> Subject: RE: [Vantage] BOM on the SO/PS/Invoice
>
> I guess is that they want to see what material went into it (but you
> don't want to show how much or costs), right?
>
> When you create the job, why not a print screen of the BOM on the
job
> and send that? Or am I missing something?
>
> M. Manasa Reddy
> manasa@... <mailto:manasa%40weldcoa.com> <mailto:manasa%
40weldcoa.com>
> P: 630-806-2000
> F: 630-806-2001
>
> ________________________________
>
> From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> <mailto:vantage%
40yahoogroups.com> ] On Behalf
> Of Ken Williams
> Sent: Thursday, July 17, 2008 2:05 PM
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
> Subject: [Vantage] BOM on the SO/PS/Invoice
>
> We have a few select customers that require a BOM on repair work we
do
> on the Packing Slip & Invoice.
>
> Our current situation is to add the BOM manually to the SO, push it
> through like a normal order through invoicing, then manually qty
> adjusting the parts back up (as they've now been issued to the job
and
> then again to the packing slip). Fortunately, the repair work we do
> generally has just a few materials.
>
> Obviously this is an ugly situation and has a lot of room for
error. I'm
> entertaining the thoughts of pulling the BOM via Crystal and
linking it
> to the default customer price list so that with a check box on the
order
> or customer level this can be a subreport that prints on the
> SO/PS/Invoice.
>
> That task sounds really nasty and I'm very hopeful there's
something I'm
> missing in the system that would allow me to do this a little
easier, or
> perhaps someone has a suggestion/report done already that I could
steal.
>
> Thanks,
> Ken
>
> [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>

[Non-text portions of this message have been removed]

________________________________
DISCLAIMER:
This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately.

[Non-text portions of this message have been removed]






[Non-text portions of this message have been removed]
We have a few select customers that require a BOM on repair work we do on the Packing Slip & Invoice.

Our current situation is to add the BOM manually to the SO, push it through like a normal order through invoicing, then manually qty adjusting the parts back up (as they've now been issued to the job and then again to the packing slip). Fortunately, the repair work we do generally has just a few materials.

Obviously this is an ugly situation and has a lot of room for error. I'm entertaining the thoughts of pulling the BOM via Crystal and linking it to the default customer price list so that with a check box on the order or customer level this can be a subreport that prints on the SO/PS/Invoice.

That task sounds really nasty and I'm very hopeful there's something I'm missing in the system that would allow me to do this a little easier, or perhaps someone has a suggestion/report done already that I could steal.

Thanks,
Ken


[Non-text portions of this message have been removed]
I guess is that they want to see what material went into it (but you
don't want to show how much or costs), right?

When you create the job, why not a print screen of the BOM on the job
and send that? Or am I missing something?




M. Manasa Reddy
manasa@...
P: 630-806-2000
F: 630-806-2001


________________________________

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Ken Williams
Sent: Thursday, July 17, 2008 2:05 PM
To: vantage@yahoogroups.com
Subject: [Vantage] BOM on the SO/PS/Invoice



We have a few select customers that require a BOM on repair work we do
on the Packing Slip & Invoice.

Our current situation is to add the BOM manually to the SO, push it
through like a normal order through invoicing, then manually qty
adjusting the parts back up (as they've now been issued to the job and
then again to the packing slip). Fortunately, the repair work we do
generally has just a few materials.

Obviously this is an ugly situation and has a lot of room for error. I'm
entertaining the thoughts of pulling the BOM via Crystal and linking it
to the default customer price list so that with a check box on the order
or customer level this can be a subreport that prints on the
SO/PS/Invoice.

That task sounds really nasty and I'm very hopeful there's something I'm
missing in the system that would allow me to do this a little easier, or
perhaps someone has a suggestion/report done already that I could steal.

Thanks,
Ken

[Non-text portions of this message have been removed]






[Non-text portions of this message have been removed]
They want a material breakdown with their costs (thus the link to the customer price list).

The problem with a print screen is volume. We literally do a thousand or so jobs a month, and to put a step in of printscreen of a BOM is both burdensome and not overly professional. Was hoping to have it on the same page (thus a subreport) that is done via a checkmark.

________________________________

From: vantage@yahoogroups.com on behalf of Manasa Reddy
Sent: Thu 7/17/2008 3:34 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] BOM on the SO/PS/Invoice



I guess is that they want to see what material went into it (but you
don't want to show how much or costs), right?

When you create the job, why not a print screen of the BOM on the job
and send that? Or am I missing something?




M. Manasa Reddy
manasa@... <mailto:manasa%40weldcoa.com>
P: 630-806-2000
F: 630-806-2001


________________________________

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On Behalf
Of Ken Williams
Sent: Thursday, July 17, 2008 2:05 PM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] BOM on the SO/PS/Invoice

We have a few select customers that require a BOM on repair work we do
on the Packing Slip & Invoice.

Our current situation is to add the BOM manually to the SO, push it
through like a normal order through invoicing, then manually qty
adjusting the parts back up (as they've now been issued to the job and
then again to the packing slip). Fortunately, the repair work we do
generally has just a few materials.

Obviously this is an ugly situation and has a lot of room for error. I'm
entertaining the thoughts of pulling the BOM via Crystal and linking it
to the default customer price list so that with a check box on the order
or customer level this can be a subreport that prints on the
SO/PS/Invoice.

That task sounds really nasty and I'm very hopeful there's something I'm
missing in the system that would allow me to do this a little easier, or
perhaps someone has a suggestion/report done already that I could steal.

Thanks,
Ken

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]






[Non-text portions of this message have been removed]
I thought I'd follow up with a customization we knocked out in a few hours today to get what we want....well mostly, we'll probably modify it to look up the customer price list in the future. One side question, is there a way to have a whereclause with two clauses? We were originally trying to tackle this issue a harder way, but I can see we may want to use two clauses in the future. For instance, perhaps jobnum & mtlseq for the example below (our original hard way of thinking about it).

For further detail below, we opted to use spaces to control the output to Crystal (as opposed to tabs, we couldn't control tabs as well as spaces). The below doesn't necessarily look great on the screen, but it looks perfect for the customer on all the paperwork. I'm interested in any comments, this was literally scrapped together in less than 2 hours this afternoon, so I'm sure there's room for improvement/optimization.

Anyway, we added a button called btnBOM, below is the sub-routine run when the button is clicked:

Private Sub btnBOM_Click(ByVal Sender As Object, ByVal Args As System.EventArgs) Handles btnBOM.Click
'// ** Place Event Handling Code Here **
Dim edv As EpiDataView = CType(oTrans.EpiDataViews("JobProd"), EpiDataView) 'jobproduction table lookup
Dim edvJO as string = edv.dataView(edv.row)("JobNum") 'return just related job number
Dim recSelected as boolean 'true/false flag
Dim whereClause as string ="JobNum ='" & edvJO & "'" 'where clause
Dim dsJob as DataSet = Epicor.Mfg.UI.FormFunctions.SearchFunctions.listLookup(oTrans,"JobMtlSearchAdapter",recSelected,False,whereClause)
Dim nummtlitems as integer
Dim x as integer = 0
Dim comment As String
comment = "LABOR" & " "
comment = comment & "$" & Chr(13) & Chr(10)
if recSelected = true 'don't do anything if there are no materials
nummtlitems=(dsJob.Tables(0).Rows.Count)
for x=0 to nummtlitems-1
Dim PartLen As Integer = 0
Dim DescLen As Integer = 0
Dim QtyLen As Integer = 0
Dim PartSpaceLeft As Integer = 0
Dim DescSpaceLeft As Integer = 0
Dim QtySpaceLeft As Integer = 0
Dim GoodPart As String = ""
Dim GoodDesc As String = ""

Dim PartSpace As String = ""
Dim DescSpace As String = ""
Dim QtySpace As String = ""
Dim Part As String = ""
Dim Desc As String = ""
Dim Qty As String = ""
Dim UM As String = ""
Dim i As Integer = 0
Dim j As Integer = 0
Dim k As Integer = 0

Part = dsJob.Tables(0).Rows(x)("PartNum")
Desc = dsJob.Tables(0).Rows(x)("Description")
Qty = dsJob.Tables(0).Rows(x)("QtyPer")
UM = dsJob.Tables(0).Rows(x)("IUM")


PartLen = Len(dsJob.Tables(0).Rows(x)("PartNum"))
If PartLen > 25 Then
Partlen = 25
Else
PartLen = Len(dsJob.Tables(0).Rows(x)("PartNum"))
End If
DescLen = Len(dsJob.Tables(0).Rows(x)("Description"))
If DescLen > 40 Then
DescLen = 40
Else
DescLen = Len(dsJob.Tables(0).Rows(x)("Description"))
End If
QtyLen = Len(dsJob.Tables(0).Rows(x)("QtyPer"))
PartSpaceLeft = 25 - PartLen
DescSpaceLeft = 40 - DescLen
QtySpaceLeft = 24 - QtyLen

If PartSpaceLeft = 0 Then
PartSpaceLeft = ""
Else
For i = 1 To PartSpaceLeft
PartSpace = PartSpace & " "
Next i
End If

If DescSpaceLeft = 0 Then
DescSpaceLeft = ""
Else
For j = 1 To DescSpaceLeft
DescSpace = DescSpace & " "
Next j
End If
If QtySpaceLeft = 0 Then
QtySpaceLeft = ""
Else
For k = 1 To QtySpaceLeft
QtySpace = QtySpace & " "
Next k
End If
Part = left(Part,25)
Desc = left(Desc,40)
Qty = left(Qty,8)

comment = comment & Part & PartSpace & Desc & DescSpace
comment = comment & Qty & UM & QtySpace & "$" & CHR(13) & CHR(10)

next x
txtSalesOrderComment.Text = comment
end if

End Sub

________________________________

From: vantage@yahoogroups.com on behalf of Ken Williams
Sent: Thu 7/17/2008 4:00 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] BOM on the SO/PS/Invoice



They want a material breakdown with their costs (thus the link to the customer price list).

The problem with a print screen is volume. We literally do a thousand or so jobs a month, and to put a step in of printscreen of a BOM is both burdensome and not overly professional. Was hoping to have it on the same page (thus a subreport) that is done via a checkmark.

________________________________

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> on behalf of Manasa Reddy
Sent: Thu 7/17/2008 3:34 PM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] BOM on the SO/PS/Invoice

I guess is that they want to see what material went into it (but you
don't want to show how much or costs), right?

When you create the job, why not a print screen of the BOM on the job
and send that? Or am I missing something?

M. Manasa Reddy
manasa@... <mailto:manasa%40weldcoa.com> <mailto:manasa%40weldcoa.com>
P: 630-806-2000
F: 630-806-2001

________________________________

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> ] On Behalf
Of Ken Williams
Sent: Thursday, July 17, 2008 2:05 PM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] BOM on the SO/PS/Invoice

We have a few select customers that require a BOM on repair work we do
on the Packing Slip & Invoice.

Our current situation is to add the BOM manually to the SO, push it
through like a normal order through invoicing, then manually qty
adjusting the parts back up (as they've now been issued to the job and
then again to the packing slip). Fortunately, the repair work we do
generally has just a few materials.

Obviously this is an ugly situation and has a lot of room for error. I'm
entertaining the thoughts of pulling the BOM via Crystal and linking it
to the default customer price list so that with a check box on the order
or customer level this can be a subreport that prints on the
SO/PS/Invoice.

That task sounds really nasty and I'm very hopeful there's something I'm
missing in the system that would allow me to do this a little easier, or
perhaps someone has a suggestion/report done already that I could steal.

Thanks,
Ken

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]






[Non-text portions of this message have been removed]
Thanks for sharing. :)

Ever look at PadRight() ?

bw

--- In vantage@yahoogroups.com, "Ken Williams" <ken@...> wrote:
>
> I thought I'd follow up with a customization we knocked out in a
few hours today to get what we want....well mostly, we'll probably
modify it to look up the customer price list in the future. One side
question, is there a way to have a whereclause with two clauses? We
were originally trying to tackle this issue a harder way, but I can
see we may want to use two clauses in the future. For instance,
perhaps jobnum & mtlseq for the example below (our original hard way
of thinking about it).
>
> For further detail below, we opted to use spaces to control the
output to Crystal (as opposed to tabs, we couldn't control tabs as
well as spaces). The below doesn't necessarily look great on the
screen, but it looks perfect for the customer on all the paperwork.
I'm interested in any comments, this was literally scrapped together
in less than 2 hours this afternoon, so I'm sure there's room for
improvement/optimization.
>
> Anyway, we added a button called btnBOM, below is the sub-routine
run when the button is clicked:
>
> Private Sub btnBOM_Click(ByVal Sender As Object, ByVal Args As
System.EventArgs) Handles btnBOM.Click
> '// ** Place Event Handling Code Here **
> Dim edv As EpiDataView = CType(oTrans.EpiDataViews
("JobProd"), EpiDataView) 'jobproduction table lookup
> Dim edvJO as string = edv.dataView(edv.row)
("JobNum") 'return just related job number
> Dim recSelected as boolean 'true/false flag
> Dim whereClause as string ="JobNum ='" & edvJO & "'" 'where
clause
> Dim dsJob as DataSet =
Epicor.Mfg.UI.FormFunctions.SearchFunctions.listLookup
(oTrans,"JobMtlSearchAdapter",recSelected,False,whereClause)
> Dim nummtlitems as integer
> Dim x as integer = 0
> Dim comment As String
> comment = "LABOR"
& "
"
> comment = comment & "$" & Chr(13) & Chr(10)
> if recSelected = true 'don't do anything if there are no
materials
> nummtlitems=(dsJob.Tables(0).Rows.Count)
> for x=0 to nummtlitems-1
> Dim PartLen As Integer = 0
> Dim DescLen As Integer = 0
> Dim QtyLen As Integer = 0
> Dim PartSpaceLeft As Integer = 0
> Dim DescSpaceLeft As Integer = 0
> Dim QtySpaceLeft As Integer = 0
> Dim GoodPart As String = ""
> Dim GoodDesc As String = ""
>
> Dim PartSpace As String = ""
> Dim DescSpace As String = ""
> Dim QtySpace As String = ""
> Dim Part As String = ""
> Dim Desc As String = ""
> Dim Qty As String = ""
> Dim UM As String = ""
> Dim i As Integer = 0
> Dim j As Integer = 0
> Dim k As Integer = 0
>
> Part = dsJob.Tables(0).Rows(x)("PartNum")
> Desc = dsJob.Tables(0).Rows(x)("Description")
> Qty = dsJob.Tables(0).Rows(x)("QtyPer")
> UM = dsJob.Tables(0).Rows(x)("IUM")
>
>
> PartLen = Len(dsJob.Tables(0).Rows(x)("PartNum"))
> If PartLen > 25 Then
> Partlen = 25
> Else
> PartLen = Len(dsJob.Tables(0).Rows(x)("PartNum"))
> End If
> DescLen = Len(dsJob.Tables(0).Rows(x)("Description"))
> If DescLen > 40 Then
> DescLen = 40
> Else
> DescLen = Len(dsJob.Tables(0).Rows(x)("Description"))
> End If
> QtyLen = Len(dsJob.Tables(0).Rows(x)("QtyPer"))
> PartSpaceLeft = 25 - PartLen
> DescSpaceLeft = 40 - DescLen
> QtySpaceLeft = 24 - QtyLen
>
> If PartSpaceLeft = 0 Then
> PartSpaceLeft = ""
> Else
> For i = 1 To PartSpaceLeft
> PartSpace = PartSpace & " "
> Next i
> End If
>
> If DescSpaceLeft = 0 Then
> DescSpaceLeft = ""
> Else
> For j = 1 To DescSpaceLeft
> DescSpace = DescSpace & " "
> Next j
> End If
> If QtySpaceLeft = 0 Then
> QtySpaceLeft = ""
> Else
> For k = 1 To QtySpaceLeft
> QtySpace = QtySpace & " "
> Next k
> End If
> Part = left(Part,25)
> Desc = left(Desc,40)
> Qty = left(Qty,8)
>
> comment = comment & Part & PartSpace & Desc & DescSpace
> comment = comment & Qty & UM & QtySpace & "$" & CHR(13) &
CHR(10)
>
> next x
> txtSalesOrderComment.Text = comment
> end if
>
> End Sub
>
> ________________________________
>
> From: vantage@yahoogroups.com on behalf of Ken Williams
> Sent: Thu 7/17/2008 4:00 PM
> To: vantage@yahoogroups.com
> Subject: RE: [Vantage] BOM on the SO/PS/Invoice
>
>
>
> They want a material breakdown with their costs (thus the link to
the customer price list).
>
> The problem with a print screen is volume. We literally do a
thousand or so jobs a month, and to put a step in of printscreen of a
BOM is both burdensome and not overly professional. Was hoping to
have it on the same page (thus a subreport) that is done via a
checkmark.
>
> ________________________________
>
> From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
on behalf of Manasa Reddy
> Sent: Thu 7/17/2008 3:34 PM
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> Subject: RE: [Vantage] BOM on the SO/PS/Invoice
>
> I guess is that they want to see what material went into it (but you
> don't want to show how much or costs), right?
>
> When you create the job, why not a print screen of the BOM on the
job
> and send that? Or am I missing something?
>
> M. Manasa Reddy
> manasa@... <mailto:manasa%40weldcoa.com> <mailto:manasa%
40weldcoa.com>
> P: 630-806-2000
> F: 630-806-2001
>
> ________________________________
>
> From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com
<mailto:vantage%40yahoogroups.com> <mailto:vantage%
40yahoogroups.com> ] On Behalf
> Of Ken Williams
> Sent: Thursday, July 17, 2008 2:05 PM
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
> Subject: [Vantage] BOM on the SO/PS/Invoice
>
> We have a few select customers that require a BOM on repair work we
do
> on the Packing Slip & Invoice.
>
> Our current situation is to add the BOM manually to the SO, push it
> through like a normal order through invoicing, then manually qty
> adjusting the parts back up (as they've now been issued to the job
and
> then again to the packing slip). Fortunately, the repair work we do
> generally has just a few materials.
>
> Obviously this is an ugly situation and has a lot of room for
error. I'm
> entertaining the thoughts of pulling the BOM via Crystal and
linking it
> to the default customer price list so that with a check box on the
order
> or customer level this can be a subreport that prints on the
> SO/PS/Invoice.
>
> That task sounds really nasty and I'm very hopeful there's
something I'm
> missing in the system that would allow me to do this a little
easier, or
> perhaps someone has a suggestion/report done already that I could
steal.
>
> Thanks,
> Ken
>
> [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
Well sheesh, if you want to take the fun out of a bunch of if/then & for loops :).

Thanks for the tip, nice handy command to have.

Ken

________________________________

From: vantage@yahoogroups.com on behalf of bw2868bond
Sent: Wed 8/13/2008 4:40 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: BOM on the SO/PS/Invoice



Thanks for sharing. :)

Ever look at PadRight() ?

bw

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> , "Ken Williams" <ken@...> wrote:
>
> I thought I'd follow up with a customization we knocked out in a
few hours today to get what we want....well mostly, we'll probably
modify it to look up the customer price list in the future. One side
question, is there a way to have a whereclause with two clauses? We
were originally trying to tackle this issue a harder way, but I can
see we may want to use two clauses in the future. For instance,
perhaps jobnum & mtlseq for the example below (our original hard way
of thinking about it).
>
> For further detail below, we opted to use spaces to control the
output to Crystal (as opposed to tabs, we couldn't control tabs as
well as spaces). The below doesn't necessarily look great on the
screen, but it looks perfect for the customer on all the paperwork.
I'm interested in any comments, this was literally scrapped together
in less than 2 hours this afternoon, so I'm sure there's room for
improvement/optimization.
>
> Anyway, we added a button called btnBOM, below is the sub-routine
run when the button is clicked:
>
> Private Sub btnBOM_Click(ByVal Sender As Object, ByVal Args As
System.EventArgs) Handles btnBOM.Click
> '// ** Place Event Handling Code Here **
> Dim edv As EpiDataView = CType(oTrans.EpiDataViews
("JobProd"), EpiDataView) 'jobproduction table lookup
> Dim edvJO as string = edv.dataView(edv.row)
("JobNum") 'return just related job number
> Dim recSelected as boolean 'true/false flag
> Dim whereClause as string ="JobNum ='" & edvJO & "'" 'where
clause
> Dim dsJob as DataSet =
Epicor.Mfg.UI.FormFunctions.SearchFunctions.listLookup
(oTrans,"JobMtlSearchAdapter",recSelected,False,whereClause)
> Dim nummtlitems as integer
> Dim x as integer = 0
> Dim comment As String
> comment = "LABOR"
& "
"
> comment = comment & "$" & Chr(13) & Chr(10)
> if recSelected = true 'don't do anything if there are no
materials
> nummtlitems=(dsJob.Tables(0).Rows.Count)
> for x=0 to nummtlitems-1
> Dim PartLen As Integer = 0
> Dim DescLen As Integer = 0
> Dim QtyLen As Integer = 0
> Dim PartSpaceLeft As Integer = 0
> Dim DescSpaceLeft As Integer = 0
> Dim QtySpaceLeft As Integer = 0
> Dim GoodPart As String = ""
> Dim GoodDesc As String = ""
>
> Dim PartSpace As String = ""
> Dim DescSpace As String = ""
> Dim QtySpace As String = ""
> Dim Part As String = ""
> Dim Desc As String = ""
> Dim Qty As String = ""
> Dim UM As String = ""
> Dim i As Integer = 0
> Dim j As Integer = 0
> Dim k As Integer = 0
>
> Part = dsJob.Tables(0).Rows(x)("PartNum")
> Desc = dsJob.Tables(0).Rows(x)("Description")
> Qty = dsJob.Tables(0).Rows(x)("QtyPer")
> UM = dsJob.Tables(0).Rows(x)("IUM")
>
>
> PartLen = Len(dsJob.Tables(0).Rows(x)("PartNum"))
> If PartLen > 25 Then
> Partlen = 25
> Else
> PartLen = Len(dsJob.Tables(0).Rows(x)("PartNum"))
> End If
> DescLen = Len(dsJob.Tables(0).Rows(x)("Description"))
> If DescLen > 40 Then
> DescLen = 40
> Else
> DescLen = Len(dsJob.Tables(0).Rows(x)("Description"))
> End If
> QtyLen = Len(dsJob.Tables(0).Rows(x)("QtyPer"))
> PartSpaceLeft = 25 - PartLen
> DescSpaceLeft = 40 - DescLen
> QtySpaceLeft = 24 - QtyLen
>
> If PartSpaceLeft = 0 Then
> PartSpaceLeft = ""
> Else
> For i = 1 To PartSpaceLeft
> PartSpace = PartSpace & " "
> Next i
> End If
>
> If DescSpaceLeft = 0 Then
> DescSpaceLeft = ""
> Else
> For j = 1 To DescSpaceLeft
> DescSpace = DescSpace & " "
> Next j
> End If
> If QtySpaceLeft = 0 Then
> QtySpaceLeft = ""
> Else
> For k = 1 To QtySpaceLeft
> QtySpace = QtySpace & " "
> Next k
> End If
> Part = left(Part,25)
> Desc = left(Desc,40)
> Qty = left(Qty,8)
>
> comment = comment & Part & PartSpace & Desc & DescSpace
> comment = comment & Qty & UM & QtySpace & "$" & CHR(13) &
CHR(10)
>
> next x
> txtSalesOrderComment.Text = comment
> end if
>
> End Sub
>
> ________________________________
>
> From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> on behalf of Ken Williams
> Sent: Thu 7/17/2008 4:00 PM
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> Subject: RE: [Vantage] BOM on the SO/PS/Invoice
>
>
>
> They want a material breakdown with their costs (thus the link to
the customer price list).
>
> The problem with a print screen is volume. We literally do a
thousand or so jobs a month, and to put a step in of printscreen of a
BOM is both burdensome and not overly professional. Was hoping to
have it on the same page (thus a subreport) that is done via a
checkmark.
>
> ________________________________
>
> From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
on behalf of Manasa Reddy
> Sent: Thu 7/17/2008 3:34 PM
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
> Subject: RE: [Vantage] BOM on the SO/PS/Invoice
>
> I guess is that they want to see what material went into it (but you
> don't want to show how much or costs), right?
>
> When you create the job, why not a print screen of the BOM on the
job
> and send that? Or am I missing something?
>
> M. Manasa Reddy
> manasa@... <mailto:manasa%40weldcoa.com> <mailto:manasa%
40weldcoa.com>
> P: 630-806-2000
> F: 630-806-2001
>
> ________________________________
>
> From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> <mailto:vantage%
40yahoogroups.com> ] On Behalf
> Of Ken Williams
> Sent: Thursday, July 17, 2008 2:05 PM
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
> Subject: [Vantage] BOM on the SO/PS/Invoice
>
> We have a few select customers that require a BOM on repair work we
do
> on the Packing Slip & Invoice.
>
> Our current situation is to add the BOM manually to the SO, push it
> through like a normal order through invoicing, then manually qty
> adjusting the parts back up (as they've now been issued to the job
and
> then again to the packing slip). Fortunately, the repair work we do
> generally has just a few materials.
>
> Obviously this is an ugly situation and has a lot of room for
error. I'm
> entertaining the thoughts of pulling the BOM via Crystal and
linking it
> to the default customer price list so that with a check box on the
order
> or customer level this can be a subreport that prints on the
> SO/PS/Invoice.
>
> That task sounds really nasty and I'm very hopeful there's
something I'm
> missing in the system that would allow me to do this a little
easier, or
> perhaps someone has a suggestion/report done already that I could
steal.
>
> Thanks,
> Ken
>
> [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>






[Non-text portions of this message have been removed]
Change the font in your comments field to a fixed width font like courier new and it will look great. I'm surprised you don't have the same problem when it hits Crystal. Typically variable pitched fonts like Arial and Times New Roman don't work well for this type of coding unless you use tabs to control the spacing. I'm not sure what the tab spacing is in Vantage or Crystal but yes, they can be difficult to control unless you know exactly what they are. If the tab spacing is different in the two applications it becomes almost impossible to format effectively.

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Ken Williams
Sent: Wednesday, August 13, 2008 6:39 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Re: BOM on the SO/PS/Invoice


Well sheesh, if you want to take the fun out of a bunch of if/then & for loops :).

Thanks for the tip, nice handy command to have.

Ken

________________________________

From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> on behalf of bw2868bond
Sent: Wed 8/13/2008 4:40 AM
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Re: BOM on the SO/PS/Invoice

Thanks for sharing. :)

Ever look at PadRight() ?

bw

--- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> , "Ken Williams" <ken@...> wrote:
>
> I thought I'd follow up with a customization we knocked out in a
few hours today to get what we want....well mostly, we'll probably
modify it to look up the customer price list in the future. One side
question, is there a way to have a whereclause with two clauses? We
were originally trying to tackle this issue a harder way, but I can
see we may want to use two clauses in the future. For instance,
perhaps jobnum & mtlseq for the example below (our original hard way
of thinking about it).
>
> For further detail below, we opted to use spaces to control the
output to Crystal (as opposed to tabs, we couldn't control tabs as
well as spaces). The below doesn't necessarily look great on the
screen, but it looks perfect for the customer on all the paperwork.
I'm interested in any comments, this was literally scrapped together
in less than 2 hours this afternoon, so I'm sure there's room for
improvement/optimization.
>
> Anyway, we added a button called btnBOM, below is the sub-routine
run when the button is clicked:
>
> Private Sub btnBOM_Click(ByVal Sender As Object, ByVal Args As
System.EventArgs) Handles btnBOM.Click
> '// ** Place Event Handling Code Here **
> Dim edv As EpiDataView = CType(oTrans.EpiDataViews
("JobProd"), EpiDataView) 'jobproduction table lookup
> Dim edvJO as string = edv.dataView(edv.row)
("JobNum") 'return just related job number
> Dim recSelected as boolean 'true/false flag
> Dim whereClause as string ="JobNum ='" & edvJO & "'" 'where
clause
> Dim dsJob as DataSet =
Epicor.Mfg.UI.FormFunctions.SearchFunctions.listLookup
(oTrans,"JobMtlSearchAdapter",recSelected,False,whereClause)
> Dim nummtlitems as integer
> Dim x as integer = 0
> Dim comment As String
> comment = "LABOR"
& "
"
> comment = comment & "$" & Chr(13) & Chr(10)
> if recSelected = true 'don't do anything if there are no
materials
> nummtlitems=(dsJob.Tables(0).Rows.Count)
> for x=0 to nummtlitems-1
> Dim PartLen As Integer = 0
> Dim DescLen As Integer = 0
> Dim QtyLen As Integer = 0
> Dim PartSpaceLeft As Integer = 0
> Dim DescSpaceLeft As Integer = 0
> Dim QtySpaceLeft As Integer = 0
> Dim GoodPart As String = ""
> Dim GoodDesc As String = ""
>
> Dim PartSpace As String = ""
> Dim DescSpace As String = ""
> Dim QtySpace As String = ""
> Dim Part As String = ""
> Dim Desc As String = ""
> Dim Qty As String = ""
> Dim UM As String = ""
> Dim i As Integer = 0
> Dim j As Integer = 0
> Dim k As Integer = 0
>
> Part = dsJob.Tables(0).Rows(x)("PartNum")
> Desc = dsJob.Tables(0).Rows(x)("Description")
> Qty = dsJob.Tables(0).Rows(x)("QtyPer")
> UM = dsJob.Tables(0).Rows(x)("IUM")
>
>
> PartLen = Len(dsJob.Tables(0).Rows(x)("PartNum"))
> If PartLen > 25 Then
> Partlen = 25
> Else
> PartLen = Len(dsJob.Tables(0).Rows(x)("PartNum"))
> End If
> DescLen = Len(dsJob.Tables(0).Rows(x)("Description"))
> If DescLen > 40 Then
> DescLen = 40
> Else
> DescLen = Len(dsJob.Tables(0).Rows(x)("Description"))
> End If
> QtyLen = Len(dsJob.Tables(0).Rows(x)("QtyPer"))
> PartSpaceLeft = 25 - PartLen
> DescSpaceLeft = 40 - DescLen
> QtySpaceLeft = 24 - QtyLen
>
> If PartSpaceLeft = 0 Then
> PartSpaceLeft = ""
> Else
> For i = 1 To PartSpaceLeft
> PartSpace = PartSpace & " "
> Next i
> End If
>
> If DescSpaceLeft = 0 Then
> DescSpaceLeft = ""
> Else
> For j = 1 To DescSpaceLeft
> DescSpace = DescSpace & " "
> Next j
> End If
> If QtySpaceLeft = 0 Then
> QtySpaceLeft = ""
> Else
> For k = 1 To QtySpaceLeft
> QtySpace = QtySpace & " "
> Next k
> End If
> Part = left(Part,25)
> Desc = left(Desc,40)
> Qty = left(Qty,8)
>
> comment = comment & Part & PartSpace & Desc & DescSpace
> comment = comment & Qty & UM & QtySpace & "$" & CHR(13) &
CHR(10)
>
> next x
> txtSalesOrderComment.Text = comment
> end if
>
> End Sub
>
> ________________________________
>
> From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> on behalf of Ken Williams
> Sent: Thu 7/17/2008 4:00 PM
> To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
> Subject: RE: [Vantage] BOM on the SO/PS/Invoice
>
>
>
> They want a material breakdown with their costs (thus the link to
the customer price list).
>
> The problem with a print screen is volume. We literally do a
thousand or so jobs a month, and to put a step in of printscreen of a
BOM is both burdensome and not overly professional. Was hoping to
have it on the same page (thus a subreport) that is done via a
checkmark.
>
> ________________________________
>
> From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
on behalf of Manasa Reddy
> Sent: Thu 7/17/2008 3:34 PM
> To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
> Subject: RE: [Vantage] BOM on the SO/PS/Invoice
>
> I guess is that they want to see what material went into it (but you
> don't want to show how much or costs), right?
>
> When you create the job, why not a print screen of the BOM on the
job
> and send that? Or am I missing something?
>
> M. Manasa Reddy
> manasa@... <mailto:manasa%40weldcoa.com> <mailto:manasa%
40weldcoa.com>
> P: 630-806-2000
> F: 630-806-2001
>
> ________________________________
>
> From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> <mailto:vantage%
40yahoogroups.com> ] On Behalf
> Of Ken Williams
> Sent: Thursday, July 17, 2008 2:05 PM
> To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
> Subject: [Vantage] BOM on the SO/PS/Invoice
>
> We have a few select customers that require a BOM on repair work we
do
> on the Packing Slip & Invoice.
>
> Our current situation is to add the BOM manually to the SO, push it
> through like a normal order through invoicing, then manually qty
> adjusting the parts back up (as they've now been issued to the job
and
> then again to the packing slip). Fortunately, the repair work we do
> generally has just a few materials.
>
> Obviously this is an ugly situation and has a lot of room for
error. I'm
> entertaining the thoughts of pulling the BOM via Crystal and
linking it
> to the default customer price list so that with a check box on the
order
> or customer level this can be a subreport that prints on the
> SO/PS/Invoice.
>
> That task sounds really nasty and I'm very hopeful there's
something I'm
> missing in the system that would allow me to do this a little
easier, or
> perhaps someone has a suggestion/report done already that I could
steal.
>
> Thanks,
> Ken
>
> [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>

[Non-text portions of this message have been removed]


________________________________
DISCLAIMER:
This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately.


[Non-text portions of this message have been removed]
Ken,

VERY cool code solution. (Bravo - particularly in light of getting it done in 2 hours!)

I'm on vacation (and yeah... why am I checking work related email?!?!) - and your post piqued my interest as your solution might be applicable to a different (but similar) need expressed by our assembly OPs group.

I've read through the email thread several times and, with my "IE hat" on, I find myself asking 'why?' (re your customer's desired cost detail support docs for the net invoice of the completed repair sales order line)...

Am I following correctly that this is all to provide additional invoice level detail (POST job completion)?

OR

Do they require this detail BEFORE you've done the repair (essentially an estimate - which assumes you reasonably know everything that will be required in advance of actually cracking open your to-be-repaired product and then diagnosing & repairing/refurbing the product)?

If it is a matter of post job completion additional invoice support detail needed, is that the reason for (in your current process) reproducing what essentially are your job details at the order level after job completion (& then doing all the reversal of reported job material activity transactions - to keep your inventory straight)?

(Again: "IE hat" on) - If NOT needed in advance (as a defacto estimate), why not just write yourself a (quite simple) custom detailed job cost BAQ report that subs consumed repair material selling prices (with any discounting appropriate in your biz) for the actual SKU asset consumed cost - and (only if also needed) sub profit margin padded 'labor costs' for the actual or standard cost labor consumed (again - only if labor charge breakdown is also needed)?

This job-cost detail-like report could then simply be included with the invoice as a support document (much like a canned certs doc or pro forma might accompany a pack list), negate the need for you to mess around with job transaction reversals, and even (internally) maintain the integrity of each repair/refurb job's cost detail (for long term repair biz profitability monitoring or for using the actual cost incurred data to ID opportunities to improve the efficiency/profitability of the repair/refurb process).

?Have I completely missed the intent?

(If so, my apologies... Just very interested in gaining a better understanding so I might assess if some variation on your code enabled process might be a path to help us with our own internal need.)

Thx (and again - VERY cool solution).

Rob





--- On Tue, 8/12/08, Ken Williams <ken@...> wrote:
From: Ken Williams <ken@...>
Subject: RE: [Vantage] BOM on the SO/PS/Invoice
To: vantage@yahoogroups.com
Date: Tuesday, August 12, 2008, 11:14 PM











I thought I'd follow up with a customization we knocked out in a few hours today to get what we want....well mostly, we'll probably modify it to look up the customer price list in the future. One side question, is there a way to have a whereclause with two clauses? We were originally trying to tackle this issue a harder way, but I can see we may want to use two clauses in the future. For instance, perhaps jobnum & mtlseq for the example below (our original hard way of thinking about it).



For further detail below, we opted to use spaces to control the output to Crystal (as opposed to tabs, we couldn't control tabs as well as spaces). The below doesn't necessarily look great on the screen, but it looks perfect for the customer on all the paperwork. I'm interested in any comments, this was literally scrapped together in less than 2 hours this afternoon, so I'm sure there's room for improvement/ optimization.



Anyway, we added a button called btnBOM, below is the sub-routine run when the button is clicked:



Private Sub btnBOM_Click( ByVal Sender As Object, ByVal Args As System.EventArgs) Handles btnBOM.Click

'// ** Place Event Handling Code Here **

Dim edv As EpiDataView = CType(oTrans. EpiDataViews( "JobProd" ), EpiDataView) 'jobproduction table lookup

Dim edvJO as string = edv.dataView( edv.row)( "JobNum") 'return just related job number

Dim recSelected as boolean 'true/false flag

Dim whereClause as string ="JobNum ='" & edvJO & "'" 'where clause

Dim dsJob as DataSet = Epicor.Mfg.UI. FormFunctions. SearchFunctions. listLookup( oTrans,"JobMtlSe archAdapter" ,recSelected, False,whereClaus e)

Dim nummtlitems as integer

Dim x as integer = 0

Dim comment As String

comment = "LABOR" & " "

comment = comment & "$" & Chr(13) & Chr(10)

if recSelected = true 'don't do anything if there are no materials

nummtlitems= (dsJob.Tables( 0).Rows.Count)

for x=0 to nummtlitems- 1

Dim PartLen As Integer = 0

Dim DescLen As Integer = 0

Dim QtyLen As Integer = 0

Dim PartSpaceLeft As Integer = 0

Dim DescSpaceLeft As Integer = 0

Dim QtySpaceLeft As Integer = 0

Dim GoodPart As String = ""

Dim GoodDesc As String = ""



Dim PartSpace As String = ""

Dim DescSpace As String = ""

Dim QtySpace As String = ""

Dim Part As String = ""

Dim Desc As String = ""

Dim Qty As String = ""

Dim UM As String = ""

Dim i As Integer = 0

Dim j As Integer = 0

Dim k As Integer = 0



Part = dsJob.Tables( 0).Rows(x) ("PartNum" )

Desc = dsJob.Tables( 0).Rows(x) ("Description" )

Qty = dsJob.Tables( 0).Rows(x) ("QtyPer" )

UM = dsJob.Tables( 0).Rows(x) ("IUM")





PartLen = Len(dsJob.Tables( 0).Rows(x) ("PartNum" ))

If PartLen > 25 Then

Partlen = 25

Else

PartLen = Len(dsJob.Tables( 0).Rows(x) ("PartNum" ))

End If

DescLen = Len(dsJob.Tables( 0).Rows(x) ("Description" ))

If DescLen > 40 Then

DescLen = 40

Else

DescLen = Len(dsJob.Tables( 0).Rows(x) ("Description" ))

End If

QtyLen = Len(dsJob.Tables( 0).Rows(x) ("QtyPer" ))

PartSpaceLeft = 25 - PartLen

DescSpaceLeft = 40 - DescLen

QtySpaceLeft = 24 - QtyLen



If PartSpaceLeft = 0 Then

PartSpaceLeft = ""

Else

For i = 1 To PartSpaceLeft

PartSpace = PartSpace & " "

Next i

End If



If DescSpaceLeft = 0 Then

DescSpaceLeft = ""

Else

For j = 1 To DescSpaceLeft

DescSpace = DescSpace & " "

Next j

End If

If QtySpaceLeft = 0 Then

QtySpaceLeft = ""

Else

For k = 1 To QtySpaceLeft

QtySpace = QtySpace & " "

Next k

End If

Part = left(Part,25)

Desc = left(Desc,40)

Qty = left(Qty,8)



comment = comment & Part & PartSpace & Desc & DescSpace

comment = comment & Qty & UM & QtySpace & "$" & CHR(13) & CHR(10)



next x

txtSalesOrderCommen t.Text = comment

end if



End Sub



____________ _________ _________ __



From: vantage@yahoogroups .com on behalf of Ken Williams

Sent: Thu 7/17/2008 4:00 PM

To: vantage@yahoogroups .com

Subject: RE: [Vantage] BOM on the SO/PS/Invoice



They want a material breakdown with their costs (thus the link to the customer price list).



The problem with a print screen is volume. We literally do a thousand or so jobs a month, and to put a step in of printscreen of a BOM is both burdensome and not overly professional. Was hoping to have it on the same page (thus a subreport) that is done via a checkmark.



____________ _________ _________ __



From: vantage@yahoogroups .com <mailto:vantage% 40yahoogroups. com> on behalf of Manasa Reddy

Sent: Thu 7/17/2008 3:34 PM

To: vantage@yahoogroups .com <mailto:vantage% 40yahoogroups. com>

Subject: RE: [Vantage] BOM on the SO/PS/Invoice



I guess is that they want to see what material went into it (but you

don't want to show how much or costs), right?



When you create the job, why not a print screen of the BOM on the job

and send that? Or am I missing something?



M. Manasa Reddy

manasa@weldcoa. com <mailto:manasa% 40weldcoa. com> <mailto:manasa% 40weldcoa. com>

P:

F:



____________ _________ _________ __



From: vantage@yahoogroups .com <mailto:vantage% 40yahoogroups. com> <mailto:vantage% 40yahoogroups. com> [mailto:vantage@yahoogroups .com <mailto:vantage% 40yahoogroups. com> <mailto:vantage% 40yahoogroups. com> ] On Behalf

Of Ken Williams

Sent: Thursday, July 17, 2008 2:05 PM

To: vantage@yahoogroups .com <mailto:vantage% 40yahoogroups. com> <mailto:vantage% 40yahoogroups. com>

Subject: [Vantage] BOM on the SO/PS/Invoice



We have a few select customers that require a BOM on repair work we do

on the Packing Slip & Invoice.



Our current situation is to add the BOM manually to the SO, push it

through like a normal order through invoicing, then manually qty

adjusting the parts back up (as they've now been issued to the job and

then again to the packing slip). Fortunately, the repair work we do

generally has just a few materials.



Obviously this is an ugly situation and has a lot of room for error. I'm

entertaining the thoughts of pulling the BOM via Crystal and linking it

to the default customer price list so that with a check box on the order

or customer level this can be a subreport that prints on the

SO/PS/Invoice.



That task sounds really nasty and I'm very hopeful there's something I'm

missing in the system that would allow me to do this a little easier, or

perhaps someone has a suggestion/report done already that I could steal.



Thanks,

Ken



[Non-text portions of this message have been removed]



[Non-text portions of this message have been removed]



[Non-text portions of this message have been removed]



[Non-text portions of this message have been removed]