Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PRINT COMMAND
Message
 
 
To
05/12/2000 18:11:21
Dave Nantais
Light speed database solutions
Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
00449657
Message ID:
00449757
Views:
8
>>>CAN ANY BODY PLEASE TELL ME WHAT IS CODE FOR PRINT BOTTON.
>>>I MADE A FORM AND I WANT TO PRINT THAT.
>>>THANKS
>>
>>Hi Mohammed,
>>
>>It depends on what do you want to print. If you want to print the form itself (like Print Screen does), it's not easy. You may try two files from Files section here (I haven't tried them yet): George Tasker's and another one (Rick Strahl ?)
>>
>>If you wan to print table records, you have to create a Report first.
>>Then your Print button would have code like:
>>report form myReport to printer noconsole.
>
>if you quickly need to send table records to a printer ....
>a command like "LIST TO PRINTER" will do the job without a REPORT defined.
>Its ugly but it has its uses.
>
>the "DISPLAY" command can also be used for certain things without requiring a REPORT defined.
>
>HTH

Hi Dave,

Yes, but as you said, it would look ugly. I have another quite universal solution for tables with few fields (not greater than 7-10). This code I use in the 'general' form, which can work on any passed table (basically, these tables have just 3-4 fields).
********************************************************************
*  Description.......: TableMaint.Print
*  Calling Samples...: 
*  Parameter List....: 
*  Created by........:  
*  Modified by.......: Nadya Nosonovsky 06/06/2000 12:51:08 PM
********************************************************************
local lcReportName
lcReportName='Reports\TableMaint'
set safety off
set notify off
select TableMstr
create report (lcReportName) from alias() column
dodefault()
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform