How do I creat a print button?  
Author Message
acf





PostPosted: Visual FoxPro General, How do I creat a print button? Top

How do I create a print button in Form of VFP9 that will print only the current record < xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Will appreciate and thanks in advance...



Visual FoxPro2  
 
 
Aleniko





PostPosted: Visual FoxPro General, How do I creat a print button? Top

This is a very generalized question. Here's a generalized answer:

First, drop a command button on the form.
Set the caption of the button to 'print' or put a little printer icon on it.
In the click method you would put whatever commands you need in order to print the current record.

The method of printing the current record will vary, but I think you would use a report form (Which you have to generate first). So your command in the click method you would have something like this:

report form someform next 1 to print preview

Again, there are different ways to do this and you have to learn and investigate the different possibilities.

Good luck.



 
 
Tamar E. Granor





PostPosted: Visual FoxPro General, How do I creat a print button? Top

First, create a report that presents the data from the record in the format you want.

Then, add a button to your form and put code in it something like this:

REPORT FORM <name of your report> NEXT 1 TO PRINT

Tamar

 
 
acf





PostPosted: Visual FoxPro General, How do I creat a print button? Top

Thanks all of you

It only work until "Preview" command button pressed,  the code of "Preview" button is:

REPORT FORM monthly.FRX PREVIEW

 

Once the "Preview" execute the "Print" command button ask for and locate the DBF file but won't do anyting

The code of "Print" command button is:

REPORT FORM invoice NEXT 1 TO PRINTER preview


 
 
Dan Freeman





PostPosted: Visual FoxPro General, How do I creat a print button? Top

Or the REAL quick and dirty LIST OFF TO PRINT NEXT 1. <g>

 
 
AndyKr





PostPosted: Visual FoxPro General, How do I creat a print button? Top

>> Any suggestion why the record not disappearing from the grid of Form when I press the delete (it indicates the deletion by black sign but not disappearing)

Check the setting of SET DELETED. In order to hide deleted records it must be ON - and it is one of the many commands that are specific to the DataSession (for a full list, see SET DATASESSION in the help file) - this means that if your form uses a Private Datasession, you must set it explicitly in that form.



 
 
acf





PostPosted: Visual FoxPro General, How do I creat a print button? Top

 Thank you very much all of you

It works perfect now but what's the right place to write this code before where it say "DELETE" or after.. and also when I double click on grid's record within the Form, it won't show or refresh the Form. (It's a one Table Form that has a grid on one side)

Is there any way to update the information in Form by cliking the grid record