Wednesday, 16 April 2014

Show APEX IR detail view by default

Since the Detail/Icon views were introduced to Interactive Reports in Oracle APEX 4.0, I've used the detail view a number of times to represent information in ways that don't even look like your standard columnar reports.

One example you may have seen was the original apexblogs.info - this was a detail view IR showing aggregated posts of APEX bloggers.
It's now hosted at odtug.com/apex and this appears to use an alternative method - Named Column report template. I now feel this is probably more superior and deserves it's own post.

I also thought the APEX 4.2 builder application search was another candidate, but looking under the hood it doesn't appear so. If you were just observing as a user you'd say ifthis wasn't implemented with an interactive report detail view, it certainly could have been.

Trouble is these Detail Views aren't shown by default. Good thing is this has a simple solution, though the mechanism may change in APEX5 or other versions.

All you need is to add this when the page loads, either under page attributes or as a dynamic action.
gReport.data.view('DETAIL');
'ICON' is the other accepted actual parameter.
Page attributes - JavaScript
And you may wish to exclude the IR search bar - allowing you to provide your users with a very customised, dynamic layout as soon as the page opens, and they won't even know it's an IR - though depending on the speed of your browser you may see the standard view rendered before the JavaScript kicks in.

Suggested links

Oracle Docs - Enabling detail view
Understanding detail view [video]
Oracle APEX Techniques - video course that includes this clip

No comments: