how to develop a Available query forms [message #81842] |
Wed, 26 March 2003 02:48  |
zhangrui
Messages: 37 Registered: March 2003
|
Member |
|
|
hi,all
I want to develop an Available query forms,it support many tables with parameters, and Only need to post one parameter(datablock) .
I design it like this (the window diagram can't put there) the canvas includes two droplist,one for field the other for compare, a text,a text list and three button(add,delete,ok)I want it perform the following task:
1. select the fields name from the droplist ¡®field¡¯. The field name comes from the datablock(pass by paramenter)
2. select compare sign from the droplist ¡®compare¡¯.
3. input the condition in the ¡®result¡¯
4. select ¡°and¡± or ¡°or¡± conn sign
WHEN u press the ¡®add¡¯ button one record input above will add to the text list. When u press ¡®delete¡¯ button a selected record will be deleted from the text tlist. When u press ¡®ok¡¯ button it will return a :global.where_clause expression..
The following is a procedure invoke the query forms :
Procedure invoke_query(block_name varchar2) is
Where_clause ,ls_old_sql varchar2(200);
Begin
Ls_old_sql:=get_block_property(block_name,DEFAULT_WHERE);
open_forms(query_forms,block_name);//invoke the query forms return :global.where_clause
where_clause:=:global.where_clause;
Where_clause:=add_where_condition(where_clause);//invoke my own function
Set_block_property(block_name,default_where,where_clause);
Execute_query;
If :system.cursor_record=0 then
Message(¡°no record found¡±)
End if;
End;
pls give me a answer
best regard!
|
|
|
|
Re: how to develop a Available query forms [message #81848 is a reply to message #81845] |
Wed, 26 March 2003 16:51   |
zhangrui
Messages: 37 Registered: March 2003
|
Member |
|
|
hi,Julie
The first question is how to get the field name from the pass paramenter(datablock);
The second is how to add the selected field name,compaire sign and the result u input and the conn to the text list when u press the "add" button.
Thanks
Regard
|
|
|
My question [message #81849 is a reply to message #81845] |
Wed, 26 March 2003 20:32  |
zhangrui
Messages: 37 Registered: March 2003
|
Member |
|
|
Hi,all
How can I get the quey_data_source_name and the query_data_source_columns(include the column name,column type,column display name) from the passed paraments('datablock')?
thanks
best regard
|
|
|