Posts

Showing posts with the label EA

Reset an Interactive Report (IR)

Image
To reset an IR back to the default settings, you may know you can go to the actions menu, and hit reset: If you inspect the apply button you will see it's calling gReport.reset() And there are a bunch of examples using this gReport object both for resetting the report and other IR functions. https://community.oracle.com/thread/2186564 https://community.oracle.com/thread/2595066 http://www.apex-at-work.com/2010/03/building-ir-filters-with-ajax-not.html http://www.apexninjas.com/blog/2012/06/the-greport-search-function-for-apex-interactive-reports/ The problem? This is not documented, and with APEX 5 supporting multiple IRs, this will no longer work. In your console, if you enter gReport, you will see that object no longer exists. The other technique you can use is the clear cache portion of the URL. According to the docs : To reset an interactive report in a link, use the string "RIR" in the Clear-Cache section of a URL. This is equivalent to the ...

APEX 5 API changes

Based on the current beta API docs:  https://docs.oracle.com/cd/E59726_01/doc.50/e39149/toc.htm , here is what's changed. APEX_APPLICATION_INSTALL Function GET_AUTO_INSTALL_SUP_OBJ added  Procedure SET_AUTO_INSTALL_SUP_OBJ added APEX_CUSTOM_AUTH LOGOUT procedure deprecated APEX_ESCAPE Function JSON added Function REGEXP added APEX_INSTANCE_ADMIN Procedure CREATE_SCHEMA_EXCEPTION added Procedure FREE_WORKSPACE_APP_IDS added Function GET_WORKSPACE_PARAMETER added Procedure REMOVE_SCHEMA_EXCEPTION added Procedure REMOVE_SCHEMA_EXCEPTIONS added Procedure REMOVE_WORKSPACE_EXCEPTIONS added Procedure RESERVE_WORKSPACE_APP_IDS added Procedure RESTRICT_SCHEMA added Procedure SET_WORKSPACE_PARAMETER added Procedure UNRESTRICT_SCHEMA added APEX_IR Procedure CHANGE_SUBSCRIPTION_EMAIL added Procedure CHANGE_REPORT_OWNER added APEX_LDAP Function SEARCH added APEX_PLUGIN_UTIL Function GET_ATTRIBUTE_AS_NUMBER added APEX_UTIL Procedure CLOSE_O...

APEX 5 blob column uploads

Image
Existing behaviour In APEX 4.2, to upload a file into a BLOB column, there are two patterns for getting the file into your table. In settings, specify the storage type as: BLOB column specified in Item Source attribute Table WWV_FLOW_FILES  I tend to use method 2, and will be focusing on that pattern. This table can also be referred to with either: WWV_FLOW_FILES APEX_APPLICATION_FILES HTMLDB_APPLICATION_FILES Which you can see with the following query: select * from all_synonyms where table_name = 'WWV_FLOW_FILES' On your form page, whenever you have chosen a file to upload, and submit the page, the file will be uploaded into wwv_flow_files. The name column is the value assigned to the page item, so to fetch that particular file upload you would have something like: declare l_filerow apex_application_files%rowtype; begin select * into l_filerow from apex_application_files where name = :Px_ITEM_NAME; --Do somet...

APEX 5 supporting file enhancements

Image
Existing behaviour In APEX 4.2, files can be uploading through shared components, and can either be associated with an application or workspace, and can be stored in either: Cascading Style Sheets Images Static Files These files can generally be found in the view: APEX_WORKSPACE_FILES Files are then referenced throughout the application by: #APP_IMAGES#<file_name> or #WORKSPACE_IMAGES#<file_name> Files can also be included in application exports, by creating an installation script for these files (to ensure they are available when deployed): Select  Create Scripts to Install Files under tasks when creating a new installation script: Then it's just a matter of selecting which files to include in the installation script New behaviour In the current form, this has changed to divide files up into application files and workspace files: This file uploader is not a multi-file uploader control, but it now has support for u...

APEX5 EA APEX_ZIP usage

I recently saw a link to a presentation that made mention of APEX_ZIP for the upcoming release of APEX (Version 5). Currently in early adopter, you can have a play around. So just thought I'd go and have a bit more of a play to see the possiblities. On the presentation, and specifically for extracting files the sample code is: declare l_zip_file BLOB; l_unzipped_file BLOB; l_files apex_zip.t_files; begin select file_content into l_zip_file from my_zip_files where file_name = :P13_file_name; l_files := apex_zip.get_files(p_zipped_blob => l_zip_file); for i in 1..l_files.COUNT LOOP l_unzipped_file := apex_zip.get_file_content(p_zipped_blob => l_zip_file, p_file_name => l_files(i)); insert into my_files (file_name, file_content) values (l_files(i), l_unzipped_file)...

Two Apex 4.2 Noteworthy APIs

Well, yesterday oracle released the first early adopter of application express, having had a chance to have a little play around, these are the ones that caught my attention: APEX_IR See:  http://apex.oracle.com/pls/apex/f?p=38997:1:0::NO:RP,1:P1_MARQUEE_FEATURE:Interactive%20Report%20Enhancements There are currently some interactive reports utility functions/procedures as part of the apex_util package. These will now be deprecated, and functionality will be added to a package named APEX_IR. The most exciting addition is the ability to get the derived IR query (from added filters/sorts). Without any published API docs, I can only assume this is through the function get_report. Further, I set up an example on page 2 of the sample database application. Created a new popup page with a dynamic region with the following source: declare l_report apex_ir.t_report; begin l_report := apex_ir.get_report( p_region_id => 6506762112827941367, p_page_id =>...