Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Reset Interactive Report before next search

SandijsMar 2 2011 — edited Mar 2 2011
Hi,

I need to automatically reset Interactive Report before new search is executed. Is it possible in Apex 4.01 version?
In my case IR search should work like regular google search where only one filter at a time is applied.

I found out that filters can not be removed from private reports with APEX_UTIL.IR_CLEAR so I decided to call gReport.reset() from JavaScript and after that submit new search. I created text item P6_SEARCH_TEXT and button wich calls javascript function Search:
function Search ()
{
$('#apexir_SEARCH').val($x('P6_SEARCH_TEXT').value);
gReport.search('SEARCH');
};
This works like regular IR search.

When I add greport.reset() call to Search function, my search form stops working.
function Search ()
{
gReport.reset();
$('#apexir_SEARCH').val($x('P6_SEARCH_TEXT').value);
gReport.search('SEARCH');
};
What am I missing?

Comments

unknown-7404

In a package, I have a function to retrieve a list of records in a refcursor.

Just for clarification a cursor DOES NOT contain data. It is just a pointer you can use to FETCH data.

The records are of type "user defined type"

When I execute this function, the output variables log shows that my <Return Value> --> value

as one column of my_user_defined_type(columnA, columnB, ...)

The
values displayed are
"oracle.jdbc.proxy.oracle$1proxy$1NullProxy$2java$1sql$2Struct$$$Proxy@<an
hexadecimal value per record>

Ok - what would expect a pointer to look like?

There IS NO DATA until something/someone does a FETCH on the cursor.

1. I have a list of the top ten movies for 2016 and provide a telephone number you can use to get the list

2. You write a function to retrieve a telephone number you can use to get that list.

3. You execute the function.

Ok - all you have is the telephone number. Specifically you DO NOT have the list.

If you want the list you have to CALL the telephone number and FETCH the list.

Yanovic

Wow!

What a brilliant answer!

Really!

I did not know about that!

Try to be more nice in your reply

Yanovic

ok.

I want to understand why I cannot see this function result in SQL Developper under the Output Variables - log

Function retrieve_list  return ref cursor

IS

  Type t_ref_cursor is ref cursor

  v_ref_cursor t_ref_cursor

begin

  open  v_ref_cursor  for

   select my_user_defined_type (columnA, columnB)

   from table zzz;

return v_ref_cursor ;

end;

But it works if i remove the constructor (user defined type) in the query...like this

Function retrieve_list  return ref cursor

IS

  Type t_ref_cursor is ref cursor

  v_ref_cursor t_ref_cursor

begin

  open  v_ref_cursor  for

   select columnA, columnB

   from table zzz;

return v_ref_cursor ;

end;

Yanovic

Here are screeshot from SQL Developer of what i'm saying.

With User defined type :

with_user_defined_type.jpg

Without User defined type :

without_user_defined_type.jpg

1 - 4
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Mar 30 2011
Added on Mar 2 2011
4 comments
3,314 views