Maybe because you are issuing the commands backwards, try this order
REPORT FORM FileName1 | ?
[ENVIRONMENT]
[Scope] [FOR lExpression1] [WHILE lExpression2]
[HEADING cHeadingText]
[NOCONSOLE]
[NOOPTIMIZE]
[PLAIN]
[RANGE nStartPage [, nEndPage]]
[PREVIEW [[IN] WINDOW WindowName | IN SCREEN]
[NOWAIT]]
[TO PRINTER [PROMPT] | TO FILE FileName2 [ASCII]]
[NAME ObjectName]
[SUMMARY]
>hello everybody.
>
>in my app i am building the report commands by adding the different command clause's depending on certain variables, parameters, and status/values of objects. the end result in my test looks exactly like this:
>Report Form invtest1.frx To Printer NOCONSOLE for ThisForm.SetThermUpd() = .t. Range 3, 3
>the command works fine, the report prints (in this test a total of 5 pages where calculated), but it prints all the pages (1 through 5) and totaly ignores the 'Range 3, 3' clause.
>
>i am working with Vfp6 Sp5. the reports are Fox2.5 reports called from vfp (there are some reasons why i do not use vfp reports).
>
>maybe vfp has 2 seperate 'report form' commands within and if it detects a dos report it switches internaly to the 'older' command, which does not have a range clause? i didn't think ms would have done this, but thats the only explanation i can come up with.
>
>if this is the case, is there a different way i can accomplish this?
>
>any help is always greatly appreaciated!