Last week, I posted about the release of APEX 4.2.2, and promised to start blogging about the various packaged applications included with the standard APEX. Today, we'll be looking at one of the Sample Applications: Sample Reporting. Now, even if you think you know how reports in APEX work, I recommend taking a look at this application–and I'll tell you why.
Reports have always been one of APEX's biggest features–if you can't get data out of your database, what's the point, right? With a few clicks, you can create a report, change the format masks of columns, move columns around, hide them, change the sort order, build links; the classic reports are fairly full-featured. And that's not even mentioning the interactive reports, which were introduced in APEX 4.0, allowing your users to do all of those actions, without having to bother developers at all!
But that's not really why I want to talk about the Sample Reporting application. Yes, it shows you how to use a classic report and an interactive report, but the fun stuff is tucked away underneath the Use Cases and SQL Examples tabs–both of which are new in the 4.2.2 release.
Under Use Cases, you'll find a set of examples of how to do different techniques above and beyond the basic report functionality, many of which your users will thank you for. Want to add some filter functionality that's friendlier than what interactive reports give you? We've got examples for that. Want to include colorful buttons in your report? Yep, take a look. Some of the stuff may be old hat to you, but I'm hopeful that there are some examples that you'll find exciting and useful.
Under SQL Examples, we included a slew of reports specifically designed to highlight stuff you can do in SQL beyond the basic “select…from…where…order by” pattern. Analytic functions (which I blogged about here), regular expressions, inline views, and–one of my newest favorite techniques–pipelined functions are all demonstrated. Some of these are things that I still periodically need to look up, since although they're useful, I don't use them often enough to have memorized; this sample application can be a useful reference for these.
All of the reports include an expandable region which shows the SQL source behind the scenes, so you can see exactly how we're doing everything without having to go into the builder.
Leave a Reply