Document ID: 39768.1 Creator: MJAMIESO Subject: Calling Oracle Forms from Oracle Reports Modified: 09 Oct 96 10:19:28 Question ======== How can I call Oracle Forms 4.5 from Oracle Reports 2.5 Answer ====== Under Developer 2000 (Release 1.2) on Windows, there exists a pl/sql library which can be used to invoke excutables residing on the PC. The library (D2KWEXEC.PLL, located in the FORMS45/DEMO/REUSE directory) is attached to the Report in the following manner: 1) Modify the D2KWEXEC.PLL to change any references to the Forms built-in MESSAGE to the Reports built-in SRW.MESSAGE. 2) Choose the 'Attached Libraries' section for your report and select the 'Navigator/Create' menu option - this will cause the 'Attached Library' dialog to be displayed. 3) Use the 'Find' button to locate the library file (D2KWEXEC.PLL) and then attached it to the report using the 'Attach' button. A warning is displayed you that a hard coded path name is being used and gives the option of removing it. If the full path is removed, then the FORMS45_PATH variable will be used subsequently to locate the library. The directory in which the library is located must be part of FORMS45_PATH. Then select the appropriate trigger from where Oracle Forms should be invoked from. In that trigger reproduce the following code: functionreturn boolean is command_string VARCHAR2 (100); BEGIN command_string := 'c:\orawin\bin\f45run.exe'; RETURN d2k_winexec.execute (command_string); END; Note: 'command_string' contains the full path of the Oracle Forms Runtime executable. When the trigger fires, the Forms Runtime Executable is invoked automatically.