Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Marking Records as Printed

Status
Not open for further replies.

RPowers

Programmer
Jun 15, 1999
2
US
Foxpro 2.6 DOS, Win98, Novell 4.11 is our setup.
I mark records with a "P" when an invoice is printed and the full invoice does get printed. The problem is that the only record that gets marked as printed is the first record.
This only happens once in a while which makes this confusing.
The following is the code that takes care of this.

REPORT FORM ORDERS TO PRINTER FOR print_val()

FUNCTION print_val
REPLACE rtorders.code with "P"
RETURN .T.

 
Try this instead:

In your report form itself, create a field with the function =print_val() as the expression.
Click the "Print when..." and click "Print only when expression is true..."
In the box that says "Print Field When...", type in .F.
Click OK, OK, OK to save expression.
Be sure and include the function print_val() in the calling code.
It will now update the table for each record that prints.

Dave S.
 
I have a similar system but I have a field called batch.
just before the report form call I do a

lcBatch = sys(2015)
replace all batch with lcBatch for empty(batch)
report form INVOICE to print for alltrim(Batch) = lcBatch

This allows me to reproduce a specific invoice run. David W. Grewe
Dave@internationalbid.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top