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!

Multiple Copies of a Report

Status
Not open for further replies.

GKBray

IS-IT--Management
Jan 14, 2003
51
GB
How can I specify that I want multiple copies of a report to Print.

I am using the Report Form Command.

Many Thanks

G K Bray MCSE+I(NT 4.0) MCSE(Win2k) MCP (XP)
 

One way is to hack you report on-the-fly before you run your report and change the information contained in the Expr field.

[/code]DO CHANGENUMBER("myReport",10) && Ir what ever number you need.

FUNCTION CHANGENUMBER
LPARAMETER lcFRX, lnCopies
LOCAL lcNewExpr, lnStartCopiesLine, lcStartAtCopiesLine, lnEndCopiesLine ;
lnLenCopiesLine, lcTop, lcBottom
#DEFINE vfCRLF CHR(13) + CHR(10)

IF !(UPPER(RIGHT(lcFRX, 4)) = ".FRX")
lcFRX = lcFRX + ".FRX"
ENDIF
USE (lcFRX)
LOCATE FOR objType = 1 AND objCode = 53

IF EMPTY(EXPR)

lcNewExpr = "COPIES=" + ALLT(STR(lnCopies)) + vfCRLF
ELSE

lnStartCopiesLine = ATC("COPIES", EXPR)
lcStartAtCopiesLine = SUBSTR(EXPR, lnStartCopiesLine)
lnEndCopiesLine = ATC(vfCRLF, lcStartAtCopiesLine)
lnLenCopiesLine = LEN(SUBSTR(lcStartAtCopiesLine, 1, lnEndCopiesLine))
lcTop = SUBSTR(EXPR, 1, lnStartCopiesLine - 1)
lcBottom = SUBSTR(EXPR, (LEN(lcTop) + lnLenCopiesLine))
lcNewExpr = lcTop + "COPIES=" + ALLT(STR(lnCopies)) + lcBottom

ENDIF

REPLACE EXPR WITH lcNewExpr
USE IN (lcFRX)
ENDFUNC
[/code]

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
If you want to leave it up to the user, you could include the PROMPT option and if the printer driver supports it, the copies property could be changed.

Rick
 
Have the user indicate copies to a variable or property and use a "for loop"

for i to l_ncopies
repo form ?????
endfor


Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top