Xref: alice comp.databases.oracle.tools:37138
Path: alice!news-feed.fnsi.net!newsfeed.icl.net!newspeer.clara.net!news.clara.net!bignews.mediaways.net!newsfeed00.btx.dtag.de!newsmm00.btx.dtag.de!news.btx.dtag.de!not-for-mail
From: Guenter Huerkamp <guenter-huerkamp@t-online.de>
Newsgroups: comp.databases.oracle.tools
Subject: Re: Directory of the Forms application
Date: Sun, 12 Dec 1999 13:58:08 +0100
Organization: T-Online
Lines: 45
Message-ID: <38539BDC.7A9ECBF@t-online.de>
References: <384CE0BB.AFA8D73E@cern.ch>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: news07.btx.dtag.de 945003506 22383 0254598216-0001 991212 12:58:26
X-Complaints-To: abuse@t-online.de
To: Erika.Grondzakova@cern.ch
X-Sender: 0254598216-0001@t-dialin.net
X-Mailer: Mozilla 4.7 [de] (WinNT; I)
X-Accept-Language: de

Hello Erika,
try this function:

FUNCTION workdir RETURN varchar2 IS
   formname  varchar2(12);
   path_und_formname varchar2(200);

begin
  path_und_formname := Get_application_property(current_form);
  return(substr(path_und_formname,1,instr(path_und_formname, '\',-1,1)));
end;

Then you can call your report with
Run_Product(REPORTS, workdir || generation_result',
SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id, NULL);

HTH
Günter
Erika Grondzakova schrieb:

> Hello,
>
> How could I find out what is the directory from which I have run the
> Forms application?
>
> I would need this info for running the report from this Forms
> application, which will be placed in the same directory as the Forms
> application.
>
> If I define hard-coded path in the Forms application to the report file,
> it works fine.
> Run_Product(REPORTS, 'C:\forms45\migration\generation_result',
> SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id, NULL);
>
> But I know that the application will be placed in different directories,
> so I would need to change it and compile it again...
> I was looking for the system variables, or GET_APPLICATION_PROPERTY, but
> I didn't find any information about the directory.
>
> Does anybody have any idea?
>
> Thanks a lot in advance,
>
> Erika Grondzakova

