cancel
Showing results for 
Search instead for 
Did you mean: 

"Select" Question

Former Member
0 Kudos

I have a work orders with Operations

Kitting

Qcwip

Assy

Qcwip

Some Operations are done twice but each have a seq# to identify there order of operation.

10 Kitting

20 Qcwip

30 Assy

40 Qcwip

My problem is I need to separate (Identify) the operation with the same name, Things to consider- there is no constant on these Work Orders some only have one Qcwip others have more operation so the seq# changes.

In need to identify them as QC 1, and QC 2.

Any suggestion would be greatly appreciated

Shirley

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Assuming these are the contents of your field

10 Kitting

20 Qcwip

30 Assy

40 Qcwip

You can create a formulam

@operation

mid(yourfield, 4, 10)

Or

If mid(yourfield, 4, 5) = 'Qcwip' then 'QC' else

mid(yourfield, 4, 10)

YOu can group on this field and then do a Running Total for each type

Ian

Former Member
0 Kudos

Sorry I should have made it clearer. Then numbers = Field(Sequence #) the Name(QCWIP) is the Operation. Two different fields. I am grouping on the Operation name QCWIP and need to be able to tell the first from the second. The Seq # Changes so I can't use that field to determine the difference. My only thought on this was if I could somehow flag the occurance of the Operation and then identify them as QC1 and QC2.

Seq# Operation

10 Kitting

20 Qcwip

30 Assy

40 Qcwip

Former Member
0 Kudos

Group on formula

@Group

operation&Seq

Then for group name field

@GrpName

If Operation = 'Qcwip' then 'QC'&totext(RT, 0,"") else

Operation

Where RT is the Running total I described in my earlier post.

Ian

Former Member
0 Kudos

I can't use the seq# it is a variable that changes, I need to identify the first instance that QCWIP occurs on a Work Order as QC1 and the second occurrence as QC2. So I can Group all QC1 together as well as Group QC2.

WO# 4566

Seq# =20 OperationName = QCWIP I want the first QC Op to equal QC1

Seq# =40 OperationName = QCWIP and the second instance to = QC2

WO# 4567

Seq# =25 OperationName = QCWIP =QC1

Seq# =40 OperationName = QCWIP =QC2

WO# 4568

Seq# =25 OperationName = QCWIP = QC1

Seq# =50 OperationName = QCWIP =QC2

As you can see, if I use the seq# I still won't be able to group them because they willl all be different.

Former Member
0 Kudos

Shirley,

Grouping takes precedence over sorting. So...

Group Level 1 = WorkOrder

Sort Order = SeqNumber

If you want the QCWIP opperations numbered, you can do it by following these steps...

1) Create a running total on the Operation field using the following inputs

Running Total Name = RT_QCWIP

Field to summarize = Operation

Type of summary = count

Evaluate... Use a formula:


{TableName.Operations} = "QCWIP"

Reset... On change of group... WorkOrder group

2) Remove the RT from the design surface.

3) Create a new formula "NumberedOperations"


IF {TableName.Operations} = "QCWIP" 
THEN "QC"  & ToText({#RT_QCWIP},"0")
ELSE {TableName.Operations}

The result will look like this...


WO# 4566
20	Knitting
22	QC1
34	Assy
35	Knitting
42	Grinding
44	Assy
48	QC2
50	QC3

WO# 4567
32	Dropping
35	PickingUp
36	DustingOff
47	QC1
58	Dropping
61	PickingUp
63	DustingOff
73	QC2
85	Dropping
91	PickingUp
93	DustingOff
99	QC3

If you need any of the other operations numbered, just repeat steps 1 & 2 and add them to the formula in step 3.

HTH,

Jason

Former Member
0 Kudos

I wanted to do a quick test and ended up putting together this example... [Running Total 1.rpt|https://docs.google.com/leaf?id=0B_0KY03Gs2knYWFlN2FiMWYtMzI2My00YzNjLTljYWUtYzZlMDA0NTBlNjg4&hl=en]

It uses the AdventureWorks sample database that comes with SQL Server 2005. It's not very pretty but it should at least illustrate the idea.

Jason

Edited by: Jason Long on Jul 27, 2010 2:52 PM

Former Member
0 Kudos

Hi Jason,

Thank you for the GUI version. I got it working and now I need to group by the new OperationName QCWIP1 and QCWIP2. Is this possible? I tried making it a variable but this didn't work.

WhilePrintingRecords;

Global STRINGVAR QCWIP;

QCWIP := {@OperationName};

TIA

Shirley

Answers (0)