Home » Developer & Programmer » Forms » ...HELp urgent.. need to view data by pressing Menu item...
...HELp urgent.. need to view data by pressing Menu item... [message #136712] Fri, 09 September 2005 11:30 Go to next message
orcl_dba
Messages: 84
Registered: March 2005
Member
Hi . sorry for such simple question..

I have displayed 3 different blocks on a same canvas1 and one block on tab canvas placed on the canvas1

Now i made a menu bar where one of my menu is
view data.

behind that menu i m writing the code.


select st_id from Site where st_id = :txtstid;

but when i compile it says bad bind variable :txtstid;

when i remove the colon, it says identifier required txtstid...

Now what to do..

Then i wrote..


go_block('Site');

go_item('item1')

and now it compiled properly but when i run it .. it is not giong to that item..


may b i m doing something wrong.. how to interact with menu s..

cant i put the same functionality behind them as we do behind button press triggers..


I need to do it urgent so kindly asses what is happening ..

cant we place more than one block on same canvas and then access thier items
with the block name.

like Site.stid.
stid by the way is the text item.. that contains the site ids.. at run time..


Kindly gimme some advices. the form is so large that it is not easier me making it again..


BR
Re: ...HELp urgent.. need to view data by pressing Menu item... [message #136722 is a reply to message #136712] Fri, 09 September 2005 12:34 Go to previous messageGo to next message
Tafer
Messages: 64
Registered: July 2005
Location: Here!
Member
Put the block's name ALWAYS before the item. (It's a good practice)

go_item('site.item1');
:site.item1 := NULL;
if :site.item1 is NULL then...
Re: ...HELp urgent.. need to view data by pressing Menu item... [message #136733 is a reply to message #136712] Fri, 09 September 2005 13:49 Go to previous messageGo to next message
orcl_dba
Messages: 84
Registered: March 2005
Member
i did this but no use..
suggest something else
any senior or junior member

with some good option ..


BR
Re: ...HELp urgent.. need to view data by pressing Menu item... [message #136740 is a reply to message #136712] Fri, 09 September 2005 15:07 Go to previous messageGo to next message
Tafer
Messages: 64
Registered: July 2005
Location: Here!
Member
If you need to access an "unreachable" value try this:

copy(name_in('source_block.item'), destination_variable)

For example:
declare
 v_item varchar2;
 v_dummy number;
begin
 copy(name_in('block_a.item_b'),v_item);

 select 1
 into dummy
 from random_table
 where random_column = v_item;

 message (dummy);
end;



Sorry, this stuff is not going to work neither.
You should try to assign global or package variables with the values you want to access from the menu module.

[Updated on: Fri, 09 September 2005 15:39]

Report message to a moderator

Re: ...HELp urgent.. need to view data by pressing Menu item... [message #136768 is a reply to message #136712] Sat, 10 September 2005 00:54 Go to previous messageGo to next message
orcl_dba
Messages: 84
Registered: March 2005
Member
well
i tried this that ..
i created a test module,
one datablock 2 text items and a small very small menu bar

then i write the same code i wrote behind the original Form..

and it worked properly..


why is it not working there .. i have checked the name of the items. block name etc

Is is something to do with the placing multiple datablocks on one canvas..

sometimes These softwares starts behaving strange...

they disturb your timelines.. when such things occurs. and irritating as well.

thanx alot for this Forum for beign with all of us all the time..

Hope to hear soon ..
Re: ...HELp urgent.. need to view data by pressing Menu item... [message #136849 is a reply to message #136768] Sun, 11 September 2005 18:46 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I have not read the whole thread but to answer your first post first.

Yes you can have multiple blocks on a canvas BUT I STRONGLY suggest NEVER having the same table in more than one block. Also, the data displayed would normally be related to each other using 'relations' between the blocks. These blocks SHOULD be in 'cascade' order because the default navigation between blocks is in 'descending' order of the block within the form (but this CAN be changed in the block property sheet).

If you want to change the selection criteria for a block, use the 'default where' in the property sheet or use the 'set_block_property('blk',default_where,'new selection string') command.

Did this information help? Please reply.

David
Previous Topic: Strange problem on Win2000 SP4 clients- Form does not execute but compile successfully
Next Topic: .... Menu Bar.. Problem.....
Goto Forum:
  


Current Time: Fri Sep 20 01:53:39 CDT 2024