nondatabase item problem [message #449702] |
Wed, 31 March 2010 09:01 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
emadnabil
Messages: 179 Registered: August 2007
|
Senior Member |
|
|
Hii all
I have a field inside a form in a master block
that field is non database item
i want to query on it to retrieve data to the detailed block
when i press on "query" button in the menu and then enter a value in that field and then press "execute query" button
the result doesnot sense the value in that field
and its value change to null
although in the detailed block in i put in the condition property i put relation to that field
i want to filter on it and in the same time i don't want it a database item
how can do it?
[Updated on: Wed, 31 March 2010 09:04] Report message to a moderator
|
|
|
Re: nondatabase item problem [message #449705 is a reply to message #449702] |
Wed, 31 March 2010 09:09 ![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.
You would have to base the block on a procedure or view which includes said column so it can be become a database column and you can query on it.
|
|
|
|
|
Re: nondatabase item problem [message #449718 is a reply to message #449702] |
Wed, 31 March 2010 09:50 ![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 |
|
|
Then maybe you should give some more details on what this item is and what it's purpose is.
Bottom line though - you can't make use of non-database items in enter-query mode, oracle just ignores them. There is no way round that.
|
|
|
Re: nondatabase item problem [message #449719 is a reply to message #449717] |
Wed, 31 March 2010 09:53 ![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 |
|
|
emadnabil wrote on Wed, 31 March 2010 15:49ok
i have this field on the "detailed block"
can i make query on a field on the master block and field on the detailed block at the same time
Not using enter-query mode you can't. Enter-query mode limits you to the block you were in when you entered that mode.
You could add a third block as a control-block (non-database block) then the users can enter the query criteria in that. Then when you execute the query restrict it by those values using pre-query triggers or the default where clause. You won't be able to use enter-query mode though.
|
|
|
Re: nondatabase item problem [message #449720 is a reply to message #449702] |
Wed, 31 March 2010 09:53 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
gregor
Messages: 86 Registered: March 2010 Location: Germany
|
Member |
|
|
Hi Emadnabil,
- the POST-QUERY-TRIGGER is the Place to fill non-Database-items
exam.: select xx into :mxitem from mytab where ..
- in the PRE-QUERY-Trigger you can change the WHERE-Clause
of datablocks .
example:
If :myitem is not null THEN
SET_BLOCK_PROPERTY('MY_DETAIL_BLOCK', DEFAULT_WHERE, 'xx='||:myitem);
else ..
|
|
|