Adding selected Serial Numbers to Move Tag

(Fred Meissner) #1

We would like to have the serial numbers being moved through Report Quantity / End Activity be displayed on the Move Tag (MtlTag). From what I can tell, it looks like the Serial Numbers exist in “limbo” at this stage. I would like to pass this data on to the Move Tag report (displayed when “Print Tags” is clicked).

(Fred Meissner) #2

I have solved this. When I have some time I will give a more detailed explanation.

(Karen Tyler) #3

I’m needing to do the same thing. What was your solution?

(Fred Meissner) #4

The first step is saving the serial numbers into an extended table field. We already had this done for us by a software consultant, so I’m not going to divulge the code for that. However, I will say that it is done by adding a customization to the MES.EndActForm that runs when the user clicks OK, so that the serial numbers have now passed on and can be captured in an LaborDtl extended table field. There also needs to be some logic to automatically print the MtlTag report dialog in this customization (as it can’t be printed again once the parts have been “moved”).

Once the serial numbers are linked to a LaborDtl row, I copied the MtlTags RDD and added the LaborDtl table. I then linked it to the MtlTags table via the Company, JobNum, and AsmSeq.

I duplicated the MtlTags report, and modified the query to include LaborDtl joined on Company, JobNum, and AsmSeq (to match the RDD). Select the following fields from LaborDtl: OprSeq AS OprSeq_Lbr, LaborDtlSeq, and the SerialNumbers_c extended field. Also select T2.OprSeq AS OprSeq_Job.

Now the issue that I wrestled with for a long time is that the MtlTag is linked to the current transaction and pulls the operation that the part is now moving to, and since the serial numbers were saved to the previous LaborDtl row, they won’t pull in to the MtlTag report without a subreport that determines the previous operation.

I had to create a subreport with the parameters [TableGuid] and [OprSeq_Job]. I made the subreport by copying the MtlTags report (it should have the same modified query as described above). Place the subreport in its own Tablix row and add the following Tablix filters: [OprSeq_Job] = [OprSeq], [OprSeq_Lbr] Top N 1, [SerialNumbers_c] Top N 1.

In the subreport, remove all the Tablix rows except one. Add the following Tablix filters: [OprSeq_Job] < [OprSeq], [OprSeq_Job] Top N 1, [OprSeq_Lbr] = [OprSeq_Job], [LaborDtlSeq] Top N 1.

I then created an expression for SerialNumbers (I also included the operation those serial numbers are associated with, the previous operation. This helps the operator know where the move tag just came from).

Hopefully that helps get you on the right track. The tricks to getting it to work are:

  1. Customization that ends the activity, but before the window closes, passes the serial numbers into an extended table field and then launches the MtlTags report dialog.
  2. Link the LaborDtl table to MtlTags and then determine the previous operation and most recent LaborDtlSeq associated with that operation to retrieve the correct serial numbers.