Oracle APEX is keeping all data in database and makes it easy to create different reports for tables or views. But what if we want to present something outside of database? Like text log files – how this could be done in APEX? For regular web server it is a trivial task – usually simple configuration of web server enables to list directory and download any files from it (and it probably would be easiest way to do it). But what if we need to integrate logs browsing into APEX application? Actually there is a way to list and serve files even in APEX, if it is required. Continue reading APEX Application to View Log Files
Tag Archives: Apex
Timezones and DST in Oracle APEX
Almost all APEX applications I’ve been working with recently are used across multiple timezones, where many timezones uses DST (Daylight Saving Time) – that is basically almost all Europe and North America. The natural requirement is that users can see date+time information in their timezone time, reflecting if DST is active or not. Timezones and time conversions are always bit of mess and APEX is not supporting this completely out of box, but with small effort we can make our applications really global. Continue reading Timezones and DST in Oracle APEX
LOB As A Link in Apex
APEX 4.1 enables to include a download link to LOB object in standard or interactive repors. Documentation is available here, however the approach is not so obvious from it. So here is quick recap, how it works:
- In report query you must have column that contains LOB length (not LOB itself!) – so something like
select dbms_lob.getlength(MY_LOB) my_lob_lenght from MY_TABLE
- The report column corresponding to LOB length should be set as:
Display As: Display As Text (escape special characters, does not save state)
Number/Date Format: DOWNLOAD:TABLE_NAME:LOB_COLUMN_NAME:ROW_PRIMARY_KEY_COLUMN
(beware names are case sensitive here) - When more sophisticated download behaviour is needed you should also include columns for MIME type of data, file name and modification timestamp. Once you store basic DOWNLOAD format you can edit it with masked edit link “BLOB Download Format Mask”
- Download link is only shown when LOB length > 0 and is not null.
APEX – Dynamic Actions with Report Region
In many scenarios it would be nice if we can provide some dynamic actions to report (classical) region, which can be handled via Ajax calls, rather then submitting a whole page – these actions could include:
- Delete a line in report
- Edit a one item on one line
- Adding a line from other pop-up page
- Change order of lines
- And and many others similar Continue reading APEX – Dynamic Actions with Report Region
Well Behaving APEX Item Plugin
I ‘ve recently created multiselect plugin for APEX 4.1 – there is still little information about how exactly write APEX plugins, and some aspects – like cascading LOV, I have not found explained anywhere, so I’d like to share my experiences here:
What You Need
To write plugin you will need:
- Oracle Database and APEX running somewhere – the installation manual for APEX is very good and you can go step by step according to it
- Knowledge of PL/SQL – it is good to have PL/SQL Reference at your hand
- Reference documentation for APEX 4.1 API
- Some knowledge of APEX and also some basic knowledge of plugins – try some available tutorials you can find on web – this article will focus on rather specific issues within Item plugin.
- Oracle SQL/Developer (or other development tool)- to write PL/SQL – optional, if you are PL/SQL god and can write correct code by heart – if you struggling with PL/SQL like me this is an invaluable helper.
- Web server running on your local machine – to help to develop Javascript part of plugin
- Firefox with Firebug – to debug Javascript (or Chrome, if you prefer) Continue reading Well Behaving APEX Item Plugin