Bartender Printing Extra Labels 关注

0
Avatar
Legacy Poster

Hello Experts

 

I have created a Carton Label which is populated from a SAP
B1 Database

 

This label works fine except when we have a Sales Order with
more than one row with the same

 

Item Code:

 

Quantity:

 

But with different Type numbers in the same Sales Order.

 

User inputs the production order number and Bartender prints
labels for all the different production orders with the same Item Codes &
Quantity with different Type numbers

 

 

 

How do I get Bartender to print labels for only the
production order number inputted?

 

I have attached pictures of the View I am using in SQL
Server Management Studio and the Bartender results

 

 

The Query

 

SELECT     TOP (100)
PERCENT dbo.OWOR.DocNum, dbo.ORDR.NumAtCard, dbo.ORDR.CardName,
dbo.RDR1.U_Type, dbo.RDR1.ItemCode, dbo.RDR1.Dscription,

                   

dbo.UFD1.Descr, dbo.RDR1.U_Colour_Desc, dbo.RDR1.U_Lamp_Code,
dbo.RDR1.U_Lamp_Desc, dbo.OWOR.OriginNum

 

FROM         dbo.OWOR
INNER JOIN

                   

dbo.RDR1 ON dbo.OWOR.ItemCode = dbo.RDR1.ItemCode AND
dbo.OWOR.PlannedQty = dbo.RDR1.Quantity INNER JOIN

                     

dbo.ORDR ON dbo.RDR1.DocEntry = dbo.ORDR.DocEntry AND dbo.OWOR.OriginNum
= dbo.ORDR.DocNum LEFT OUTER JOIN

                     

dbo.UFD1 ON dbo.RDR1.U_Colour_Code = dbo.UFD1.FldValue AND
dbo.UFD1.FieldID = 13 AND dbo.UFD1.TableID = 'RDR1'

 

ORDER BY dbo.OWOR.DocNum

 

 

Attached also are pictures for the below:

 

The Query I have created in Bartender

The SQL in Bartender

The results showing three results instead of two

 

 

Would someone please show me where I am going wrong?

 

Thanks and Regards

 

Rahul

请先登录再写评论。