Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

don't know how to do key-help

Status
Not open for further replies.

jennon1207

Programmer
Jul 21, 2004
1
SI
Hi!
This is the program:

DECLARE
v_file_name VARCHAR2(1000);
v_pot VARCHAR2(1000);
--
file_locked EXCEPTION;
PRAGMA EXCEPTION_INIT(file_locked,-302000);
--
BEGIN
v_pot := ZNPV_PCK.Get_Pot_Navodila;
IF v_pot is null then
DO_KEY('HELP');
v_file_name := null;
ELSE
v_file_name:= v_pot;
END IF;
--
IF v_file_name IS NOT NULL THEN
Fexec.Run(v_file_name);
END IF;
END;

Now I have to do a key-help trigger that opens different document depending on a form that is opened. Example: if I open "ZNPV.fmb" form, "ZNPV.doc" should open when I press to the key-help butten.

I hope that you understand what I'm trying to say.
I would really be appreciate if you help me.

By!

 
Hi,
If you intend to open a .HLP file in client-server or a HTML file in the WEB environment then make use of following code(add this code in key-help trigger).
Note that to use this code you need to attached WINHELP.pll to your form at design time.
Code:
Declare
	L_Help integer;
Begin
	If Get_Application_Property(User_Interface) = 'WEB' Then
    If Var.Help_Path is Null Then
      Begin
          Var.Help_Path := '[URL unfurl="true"]www.myhost.com/path';[/URL]
    Exception
       When Others Then
           Message('Your message');
            raise Form_trigger_failure;
      End;
  	End If;
   	
   	Web.Show_Document('[URL unfurl="true"]http://'||Var.Help_Path||'/ZNPV.html',[/URL] '_blank');
 
	Else
		L_Help  := winhelp.winhelp('ZNPV.hlp','HELP_CONTENTS','');
		
	End If;


/***
  ** Exception Handling
 ***/
Exception
	When Others Then
	     Template.Show_Error('T');
End;

Otherwise if you inted to open Just a simple Doc file then make use of DDE package or Host command to open the Desired document.
Here is a sample using DDE package:
Code:
DECLARE
  AppID  PLS_INTEGER;
BEGIN
    AppID := DDE.App_Begin('d:\WinWord.exe\ZNPV.doc',DDE.App_Mode_Maximized);
Exception
      WHEN DDE.DDE_APP_FAILURE	 then
       Message('E: Error while opening Report.',NO_ACKNOWLEDGE);		
      Raise Form_Trigger_failure;			   
END;

HTH
Regards
Himanshu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top