Home » Developer & Programmer » Forms » nondatabase item problem (10g)
nondatabase item problem [message #449702] Wed, 31 March 2010 09:01 Go to next message
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 messageGo to next message
cookiemonster
Messages: 13938
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 #449709 is a reply to message #449702] Wed, 31 March 2010 09:22 Go to previous messageGo to next message
emadnabil
Messages: 179
Registered: August 2007
Senior Member
if i do something like that
it will be meaningless
Re: nondatabase item problem [message #449717 is a reply to message #449702] Wed, 31 March 2010 09:49 Go to previous messageGo to next message
emadnabil
Messages: 179
Registered: August 2007
Senior Member
ok
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
Re: nondatabase item problem [message #449718 is a reply to message #449702] Wed, 31 March 2010 09:50 Go to previous messageGo to next message
cookiemonster
Messages: 13938
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 messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
emadnabil wrote on Wed, 31 March 2010 15:49
ok
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
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 ..
Previous Topic: Add Stack Canvas on a Tab Canvas
Next Topic: Manually Display data on form
Goto Forum:
  


Current Time: Fri Sep 20 05:54:40 CDT 2024