To clarify my question I'll give an easy example:
I made a small MYPRG.PRG that takes a report name as parameter to do some stuff with that report:
I compiled this PRG (together with many others) into an EXE called MYLIB.EXE
MYLIB.EXE is like a library file with many shared routines.
Then I create a project called MYMAIN which makes use of the shared library.
That project has 1 PRG and 1 Report in it. (Just for the example, friends)
The Program is called MAIN and the Report is called DUMMYREP.
This works fine as long as I am in the development environment or as long as the Compiled MYMAIN.EXE is in the same folder as where DUMMYREP.FRX and DUMMYREP.FRT are.
But when I copy the MYMAIN.EXE to another (empty) folder and run it, it tries to execute the REPORT FORM line, but it generates an error: file does not exist. It cannot find the DUMMYREP report or report files that I passed as a parameter. I agree it is not in de MYLIB.EXE but it is present in the MYMAIN.EXE. If all the files are in the same EXE there is no problem of course, but that is not what I want.
So the question is: How can I make use of a shared library or procedure.exe with reference to a report in the calling EXE?
I made a small MYPRG.PRG that takes a report name as parameter to do some stuff with that report:
Code:
parameter repname
create table dummy (name c(10))
insert into dummy values ('Jack')
insert into dummy values ('Jill')
report form (repname) to printer prompt noconsole && this is the problem line
use
I compiled this PRG (together with many others) into an EXE called MYLIB.EXE
MYLIB.EXE is like a library file with many shared routines.
Then I create a project called MYMAIN which makes use of the shared library.
That project has 1 PRG and 1 Report in it. (Just for the example, friends)
The Program is called MAIN and the Report is called DUMMYREP.
Code:
set procedure to f:\bb\mylib.exe
do myprg with 'dummyrep'
This works fine as long as I am in the development environment or as long as the Compiled MYMAIN.EXE is in the same folder as where DUMMYREP.FRX and DUMMYREP.FRT are.
But when I copy the MYMAIN.EXE to another (empty) folder and run it, it tries to execute the REPORT FORM line, but it generates an error: file does not exist. It cannot find the DUMMYREP report or report files that I passed as a parameter. I agree it is not in de MYLIB.EXE but it is present in the MYMAIN.EXE. If all the files are in the same EXE there is no problem of course, but that is not what I want.
So the question is: How can I make use of a shared library or procedure.exe with reference to a report in the calling EXE?