Re: FPW2.6 check if report available programmatically by Andrew
Andrew
Thu Aug 18 06:26:51 CDT 2005
"Stephen Ibbs" <stephen@datadevelopments.co.uk> wrote in message
news:de1okr$8pv$1@nwrdmz02.dmz.ncs.ea.ibs-infra.bt.com...
> Forgive me if I have misunderstood your question, but I think you want to
> detect if you are calling this from within an EXE or not.
Ish.
That may work.
I'll try to explain the scenario:
We have a series of programs that we've evolved to run to produce our month
end reports. I am currently reviewing the whole procedure. Many programs
require an input date range and output filename setting, then running. It
takes quite a bit of time doing this to everything and is a bit of a pain to
run.
I decided to write a program sequencer which lets a user set global
variables (eg input date range, output directory etc.) and then runs
everything in the sequence. That bit works OK. I'm now going through all the
separate programs, making them work from the sequencer, tidying them up and
making their variables PRIVATE etc.
Whilst doing this I thought it would be really nice to allow the programs to
run on their own as before. I handled variables by checking if the global
parameter was defined. If not, it uses the local at the top of the program,
else it uses the defined global one.
That only leaves a couple of problems with running standalone; how to handle
functions and reports which the program uses which can't be found. An
example is an error report I have. Currently there is only one copy in my
company's source directory. This report is used by a routine common to
several applications (in which case project manager finds it and builds it
into the application) but I also want to use the routine in a standalone
program. I don't want to create carbon copies of the report of possible.
In writing all that I think I've realised what I need to do. :-)
In the front of my month end programs I just need a SET PATH TO <sourcedir>,
then the reports and functions will be found.
--
Thanks!
Andrew Howell