Posts

Showing posts with the label url

APEX 5 Give me Interactive Reports

Image
One of the statements of direction for APEX 5 is multiple interactive reports on a single page. Multiple Interactive Reports – Allow any number of Interactive Reports to be defined on a single page. So, time to explore that functionality. One pattern I've used in the past is loading particular saved reports (rather than the default primary report). You may have some pre-defined filters, a row highlight, specific columns. So for demonstrations, I've built an IR on the emp table. Then I go and apply some filters, and save an alternate report: Then in the page designer assign an alias to that report. As you can see, that allows me to enter in the request portion of the URL: IR_SAL_TOTAL. However, if we add a second IR to the page and try to access that saved report, we would receive an error "Report does not exist". This is because it tries to find that that report name in both IR's. To get around this, you MUST  set a static ID property fo...

Getting the instance URL

To get the instance URL of your APEX environment, it is not too uncommon to use OWA_UTIL.GET_CGI_ENV function calls, similar to the below block: declare l_protocol varchar2(5); l_host varchar2(150); l_script varchar2(15); l_instance_url varchar2(200); begin l_protocol := owa_util.get_cgi_env('REQUEST_PROTOCOL'); l_host := owa_util.get_cgi_env('HTTP_HOST'); l_script := owa_util.get_cgi_env('SCRIPT_NAME'); l_instance_url := l_protocol; l_instance_url := l_instance_url || '://'; l_instance_url := l_instance_url || l_host; l_instance_url := l_instance_url || l_script; l_instance_url := l_instance_url || '/'; dbms_output.put_line(l_instance_url); end; Something you might not know, is that there are a couple of helper functions in the APEX API that allow you to do exactly that. Option 1: APEX_UTIL.HOST_URL('SCRIPT') Reference:  http://docs.orac...