Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using @Say Screen Code to Generate Report?
Message
From
16/02/2008 00:50:22
 
 
To
15/02/2008 21:58:09
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01293147
Message ID:
01293155
Views:
14
>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 )
>
One thing you could experiment with:
- create a report cursor with a single character column long enough to contain all the characters in a single screen row
- create some sort of GenRow() function that can create a character representation of a single screen row. Hopefully the code you show above is called in some sort of orderly top-to-bottom, left-to-right manner or some such that can make your life easier
- spin through all your rows, call GenRow() for each and INSERT its output into the report cursor
- on the report, put the report cursor character column in the Detail band, and use a fixed font. Style 'U' is underline, so you can use an underline font. It might look better with a separate row of dashes or underscores below each row of "buttons" instead.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform