Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Print x copies from a report
Message
 
 
To
06/08/2003 21:49:05
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00817540
Message ID:
00817551
Views:
17
>Hi all,
>
>With one click, i need to print 4 copies from my invoice report, and, in first copie i need to put 'Original', in second 'Duplicado' etc, what's the best way to do that.
>
>João Batista

Two simple ways:

1. Create a variable in the calling program called CopyNumber. Initialize it to 1.

2. Put a field with the expression
iif(vartype(CopyNumber)<>"N","Test",iif(CopyNumber=1,"Original",iif(CopyNumber=2,"Second Copy",iif(CopyNumber=3,"Third Copy","Fourth Copy"))))

3. You can either run 4 Report Form commands incrementing the value of variable in the calling program (form) or (and it would be better), set number of copies for the report to 4 and On Exit in report footer (summary) put _VFP.SetVar("CopyNumber",CopyNumber+1) (I'm writting this by memory right now, you have to check SetVar syntax).
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