All,
I'm sure there is an easier way but I'm drawing blanks. I have a database record for printer names that is comma delimiter. I want to display this as a menu where a user can select the printer to print too.
<code>
def var menu as char format 'x(30)'.
def work-table wk_printlist
field printname as char format 'x(4)'.
def var x as int.
find sysctl where sys_param = 'LBL_PRNT_LSR'.
assign menu = sys_value.
/* this assigns menu as "PT01,PT02,PT03,PT04*/
/* now I'm putting each print name into its own record in my work-table */
do x = 1 to NUM-ENTRIES(menu):
create wk_printlist.
assign printname = ENTRY(x,menu).
end.
/* here I would like to provide a menu of wk_printlist.printname but i'm having trouble figuring out how to do this*/
</code>
Any ideas on how I can provide a menu or is there an easier way I'm not aware of?
Thanks in advance.
Rob.
I'm sure there is an easier way but I'm drawing blanks. I have a database record for printer names that is comma delimiter. I want to display this as a menu where a user can select the printer to print too.
<code>
def var menu as char format 'x(30)'.
def work-table wk_printlist
field printname as char format 'x(4)'.
def var x as int.
find sysctl where sys_param = 'LBL_PRNT_LSR'.
assign menu = sys_value.
/* this assigns menu as "PT01,PT02,PT03,PT04*/
/* now I'm putting each print name into its own record in my work-table */
do x = 1 to NUM-ENTRIES(menu):
create wk_printlist.
assign printname = ENTRY(x,menu).
end.
/* here I would like to provide a menu of wk_printlist.printname but i'm having trouble figuring out how to do this*/
</code>
Any ideas on how I can provide a menu or is there an easier way I'm not aware of?
Thanks in advance.
Rob.