' prints test label on Z Designer label printer


external	Background() makeidx() vloadif() remove() dpath X_path _SWIP_Crystal() Xreppath vunloadif()
external	messboxwait()

public	ptstr $customview $carp #prec
global	x $carpdatafile


MAIN
	single-step off
	Background()
	file unload all
	messboxwait(" Check that record number 5176 is not marked Deleted ",0,0,1)
  	remove("label.idx")
	#prec=5176
  	$carpdatafile="stk_carp"							'message "$carpdatafile is:"&str($carpdatafile)
  	x=makeidx($carpdatafile,"label.idx",#prec,5) ' message "x is:"&str(x)
   	$customview = "carprcvd.vw"                'message "$customview is:"&str($customview)
  	vloadif(dpath|$customview)
  	order change index "label.idx"
    	vunloadif("X_rlltkt.vws")
    	x=remove(X_path|"X_rlltkt.*")								' message "ptstr is:"&str(ptstr)
    	data query execute "not_del.dfq" Smart4 X_path|"X_rlltkt" fields "[Product_Code;Description_MRC;Roll_Nr;Stock_Delivered;Width;Location;Product_MRC;Backing;StockOrder;RollNr;RcvdDate;Supplier;WidthRcvd;JobNr;Customer;TicketNr;TicketTotal]"
    	_SWIP_Crystal(Xreppath|"Z_test","S",0,1,"")
'     	vloadif(dpath|$customview)
  	file unload all
END MAIN

