Order of execution have problem? [message #394169] |
Wed, 25 March 2009 22:59 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
mm_kanish05
Messages: 493 Registered: January 2007 Location: Chennai
|
Senior Member |
![mm_kanish05%40yahoo.co.in](/forum/theme/orafaq/images/yahoo.png)
|
|
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 message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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.
|
|
|
|