>Hi!
>
>I have a form with one method called Impressao.
>In this method, I have one line like this:
>
>ExecScript(FileToStr("Relatorio.PRG"))
>
>The instruction works fine... The file Relatorio.PRG has something like that:
>
>Report Form MeuRelatorio To Printer NoConsole
>
>It works great too... The problem is, inside MeuRelatorio, I have one field that need read a property from the form. Example:
>
>ThisForm.Title
>
>When VFP runs it, I received a message erro like "ThisForm just be called from a method")!
>
>How to round it?
>
>[]s
Rodolfo,
If a program needs to refer to thisform then I send it thisform as a parameter.
But as per Execscript why do you filetostr() and execscript.
Do relatorio with thisform
Is a more direct and reliable way and faster than Execscript (doesn't recompile).
It gets it as a toForm parameter and report could also use toForm.
Cetin