Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Print form properties
Message
 
 
To
21/06/1999 18:59:02
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00232128
Message ID:
00232274
Views:
32
Hi Dragan,

>> What do you think, which code is better (see my prev. message) - SET DEVICE to Print, etc. or Printing a Report?
>
>With Set Device To Print is used only for redirection of @ .. SAY commands. It's rather delimiting, though you can do very much with it - but you have to code it by hand, which is a rather expensive sport nowadays.
>
>BTW, you should try to SET PRINT TO after your SET DEVICE TO, so the spooler can know when you're finished.

You're right.

However, I have another bunch of problems:
1) Datetime appears with gray background
2) I can not print a string>255 character long, so I need to do this:
@ prow(),5 say substr(thisform.message,1,250)
@ prow(),pcol() say substr(thisform.message,251)

And major problem - instead of chr(13) - return I have some symbol...
What could you suggest? May be using a report is easiest solution here? I've already changed to report, but in this case I need to use some table, even if I don't print anything from this table...


>>> "Donald Goslin" 06/21/99 06:11PM >>>
Try this the following code. I am also using the printer row PROW()
function. Hope it helps.


* beginning of code
Local lcDevice
lcDevice=SYS(101) && Return Current device
SET DEVICE TO Printer
set print on
SET PRINTER FONT 'Courier', 12 STYLE 'I'
@prow()+2, 35 SAY Datetime()
SET PRINTER FONT 'Courier', 16 STYLE 'BI'
@prow()+2, 5 SAY THISFORM.Title
SET PRINTER FONT 'Courier', 10 STYLE 'N'
@prow()+2,5 SAY THISFORM.MESSAGE
set print off
SET DEVICE TO &lcDevice
Set printer to
** end of code
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform