Home » Developer & Programmer » Forms » Order of execution have problem? (Form 6i)
Order of execution have problem? [message #394169] Wed, 25 March 2009 22:59 Go to next message
mm_kanish05
Messages: 493
Registered: January 2007
Location: Chennai
Senior Member

Hi,
I have coded like below in when-list-item.

	If :Replst = 'TPREP' Then
		   Set_item_property('Tparam1',Prompt_text,':Unit_id');
		   Set_item_property('Tparam2',Prompt_text,Get_item_Property('Tparam2',Prompt_Text)||'-Periodid');
       Set_item_property('Tparam3',Prompt_text,Get_item_Property('Tparam3',Prompt_Text)||'-From_dt');
       Set_item_property('Tparam4',Prompt_text,Get_item_Property('Tparam4',Prompt_Text)||'-To_dt');       
       Show_window('ParamWin');	
       go_item('Tparam1');
       Tp_print;		  	
		   
	End If;


Order Should Be
1. it will set property.
2. to show the window
3. collect the parameter values from the user (Paramwin)
4. Tp_print will execute.

But Now it is working like below
1. it will set property.
2. to show the window
3. Tp_print will execute.
4. collect the parameter values from the user (Paramwin)

But Tp_print procedure expecting the some parameter from paramwindow and so the output is null.

Please help me what is the problem

kanish


Re: Order of execution have problem? [message #394241 is a reply to message #394169] Thu, 26 March 2009 05:03 Go to previous messageGo to next message
cookiemonster
Messages: 13963
Registered: September 2008
Location: Rainy Manchester
Senior Member
You can't call tp_print in the same trigger as the rest of the code.

Think about it - you haven't told oracle to wait for user input between executing the go_item statement and calling tp_print.

In fact there's no real way you can tell it to wait, when a trigger executes it runs all of it's code before returning control to the user - the only exception to this is if your trigger calls another form.

You need to add a push button to your ParamWin and have that execute tp_print.
Re: Order of execution have problem? [message #394243 is a reply to message #394169] Thu, 26 March 2009 05:18 Go to previous message
mm_kanish05
Messages: 493
Registered: January 2007
Location: Chennai
Senior Member

Yes you are right,
Already i solved my issue by executing the procedure after exit from Paramwindow.

Any way thanks for your kind instruction too.

kanish
Previous Topic: Problem to open a form
Next Topic: help in this Procedure Parameters
Goto Forum:
  


Current Time: Mon Feb 10 03:08:00 CST 2025