Hi,
i need to call LabelView from C\side as an Automation, but im confused, i need to pass parametre to print my specefic Label with dynamic Data.
Any suggestions are wellcome
Thanks a lot
Simo.
LabelDoc is automation
LabelFields is automation
LabelField is automation
LabelApp is automation
LabelPrinter is autmation
IF ISCLEAR(LabelDoc) THEN
CREATE(LabelDoc);
LabelLocation := 's:\lvwin60\LBL\cpt3.lbl'
LabelDoc.Open(LabelLocation);
LabelFields := LabelDoc.LabelFields;
/// the 'BILL_TO' etc are fields in your label file. Make sure you give them value.
FOR i := 0 TO LabelFields.Count -1 DO BEGIN
LabelField := LabelFields.Item(i);
CASE LabelField.Name OF
'BILL_TO': LabelField.Value("Sales Header"."Sell-to Customer Name");
'ITEM_UPC': LabelField.Value(repupc);
'CUST_SKU': LabelField.Value(PrePricing."Customer Item No.");
'ITEM_DESC1': LabelField.Value(ItemRec.Description);
'RET_PRICE': LabelField.Value(STRSUBSTNO('$%1',FORMAT(PrePricing."Unit Price",0,'<Precision,2:2><Standard Format,0>')));
'VOLUME': LabelField.Value(repvol);
END;
END;
LabelPrinter := LabelDoc.LabelPrinter;
LabelPrinter.Name('TEC B-572'); //printer name
LabelDoc.PrintLabel(1); //1 is number of times you want to print
CLEAR(LabelDoc);
Ahmed Rashed Amini
Independent Consultant/Developer
Comments
LabelDoc is automation
LabelFields is automation
LabelField is automation
LabelApp is automation
LabelPrinter is autmation
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
THANK YOU RASHED
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n