Aha! You have used the wrong syntax, I don't know if that will cause this behavior.
lcPrinter=getprinter()
Set printer to name (lcPrinter)
However, in this case I think you must move these lines
report form Myreport to file TxtFileName nodialog
lnPageno=_pageno
lcPrinter=getprinter()
Set printer to name (lcPrinter)
report form Myreport to printer noconsole
>Yes I have a set printer to name getprinter() before i launch that line !!!
>
>>Do you have any SET PRINTER command?
>>
>>>:) Tore I say no ...and it is NO :)
>>>no printer environment set in the report
>>>
>>>>Although you say no, I am 99.999% sure that you have the printer specified in the printer environment of the report. USE the report and check the expr field in the first record.
>>>>
>>>>>the command in question is :
>>>>>
>>>>>report form Myreport to file TxtFileName nodialog
>>>>>
>>>>>when it runs it print the report to the printer :(
>>>>>i had to delete this command, but it was run just to know the _pageno variable
>>>>>
>>>>>>Can you post the REPORT FORM command in question?
>>>>>>
>>>>>>>I know that , but i develop in vfp9 and compile the application in vfp7 :)
>>>>>>>