>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