The piece of code below basically writes a button to the screen. This is done many times to creates rows of times increments and columns of rooms for a scheduler (xx = rows and yy = columns). Since this code is running anyway, and I need to create a report that represents the screen, can I use this code somehow to create my report? It's already pretty clunky, even for legacy code, so all ideas welcome.
@ xx -1, 8 + but_size * ( yy - 1 ) SAY ALLTRIM(m.ApptRuleRemCode) + ;
REPLICATE( " ", but_size - (LEN(ALLTRIM(m.ApptRuleRemCode)))) STYLE 'U' COLOR ( m.ApptRuleSlotColor )