do set_menu
= get_pnam('PENDING SPARES ORDER (Order No. Wise)')
Wait Wind '!!! WAIT !!! Gathering Data Using SQL ..' nowa
sele monthbod.order_no,monthbod.item_no,itemmast.item,monthbod.qty, ;
		 monthbod.received,qty - monthbod.received as pending, ;
		 (qty - monthbod.received) * monthbod.rate as pend_amt ;
	 from monthbod,itemmast ;
	 where itemmast.item_no = monthbod.item_no ;
	 	 and monthbod.qty - monthbod.received > 0 ;
	 order by monthbod.order_no ;
	 into curs query

wait wind '!!! WAIT !!! Generating Report ..' nowa
do prinrepo with 'WPEND_OR','PEND_ORD','','','' 
use in query
do cls_menu