|
Re: i need help [message #503015 is a reply to message #503013] |
Tue, 12 April 2011 05:36 ![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) |
![](/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
There are two forms, right? Not one form with two blocks?
But, the second form (the one that is supposed to display orders contains two blocks? At least, that's what I understood from your "primary/foreign key & relation between blocks" sentence.
What is :PACKAGE_SU.SUP_NO? Where does it get its value from? The second form doesn't know its value, unless you passed it from the first form (either by a parameter, or by a global variable).
Which Forms version do you use? If 10g, run the form in debug mode in order to trace its execution - it would show all items, parameters and system variables' values. If 6i, include MESSAGE statements if you want to see what's going on.
|
|
|
Re: i need help [message #503016 is a reply to message #503013] |
Tue, 12 April 2011 05:42 ![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 |
|
|
Does qu_package not have a primary key?
What exactly did you do to try and create the relationship between the blocks?
How many forms are actually involved here? You mention two but your description of what you are doing implies one.
When you say the trigger didn't work what do you mean? Did you get an error? The wrong data? what?
|
|
|
|
|
Re: i need help [message #503022 is a reply to message #503016] |
Tue, 12 April 2011 06:01 ![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 |
|
|
rania_saleh wrote on Tue, 12 April 2011 11:50
the primary/foriegn key & realtion problem ,it between the supplier form and the order form.
Will you stop using the word form to describe things that aren't forms - you mean blocks here I believe.
rania_saleh wrote on Tue, 12 April 2011 11:56I try to creat relation between the blocks by add realtion from the navigator and when i write the join condition i get error ("FRM-15004 Error while parsing join condition" )
And what exactly did you put in the join condition?
You still haven't answered this question:
cookiemonster wrote on Tue, 12 April 2011 11:42
When you say the trigger didn't work what do you mean? Did you get an error? The wrong data? what?
|
|
|
|
Re: i need help [message #503027 is a reply to message #503024] |
Tue, 12 April 2011 07:07 ![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) |
kame
Messages: 69 Registered: July 2009
|
Member |
|
|
I assume you have supplier form single record(no tabular)
Try this
at supplier form when button press
:global.sup_no := :PACKAGE_SUP.SUP_NO;
call_form('Order',no_hide);
at Order Form
in table properties
Under database properties
set where clause as qsup_no = :global.Sup_no
|
|
|
Re: i need help [message #503032 is a reply to message #503024] |
Tue, 12 April 2011 07:46 ![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 |
|
|
rania_saleh wrote on Tue, 12 April 2011 12:28I put (sup_no=osup_no) in the join condition when the Master block is (package_sup) and the detail block is (package_or).
Your original post talks about package_qu not package_or. Can we fix one relationship at a time please.
rania_saleh wrote on Tue, 12 April 2011 12:28
It didnt work as i wish,i didnt get errors,it just didnt work in the runtime(when i press orders button the next form appears all orders not just order for supplier1 as in Example)
You're still talking about forms.
I suspect you're looking at the wrong block, since you set the where clause you shouldn't get all records. Use get_block_property(<block_name>, last_query) to find out what query the form issued to the DB.
|
|
|
|
Re: i need help [message #503172 is a reply to message #503163] |
Wed, 13 April 2011 06:22 ![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 |
|
|
How about trying to fix the relationship between the blocks. Have you tried using the datablock wizard to create the relationship?
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: i need help [message #503319 is a reply to message #503317] |
Thu, 14 April 2011 06:46 ![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 |
|
|
When I do it my cursor looks like this:
CURSOR QU_PACKAGE_cur IS
SELECT 1 FROM QU_PACKAGE Q
WHERE Q.QSUP_NO = :PACKAGE_SUP.SUP_NO;
What are the Database Data Block, Query Data Source Name and Query Data Source Type properties of the two blocks set to?
|
|
|
|
|
|
Re: i need help [message #503521 is a reply to message #503519] |
Sun, 17 April 2011 05:41 ![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 |
|
|
rania_saleh wrote on Sun, 17 April 2011 11:01
but when i pressed the button the new form appears
A block is not a form. Repeat that to yourself until it sinks in.
Cause if you don't you're going to confuse a lot of people when asking questions on forums.
If you've a got a relationship set up properly between the two blocks then you don't need to set the where clause.
So I can only assume the relationship isn't set up properly.
|
|
|
|