Monthly Archives: March 2011

APEX Custom PDF printing for filtered Interactive Reports

An APEX Interactive Report (IR) can be enabled to be downloaded as PDF. If you have a printing server installed with APEX, you can just edit the IR's "Printing Attributes", enable the PDF format from the "Downloads" section and the report can be downloaded as PDF from the IR's "Actions" menu:

But what if we are using a custom configuration for PDF printing and we created our own (Shared Components) Report Queries and Report Layouts? The custom PDF layouts created in this manner, depend only on the queries defined in Report Queries and not on the Interactive Reports dispayed in the page, even if they might have the same source. How do we synchronize the data from a filtered IR with a Report Query? You can see a working example on this situation here.

Continue reading

Region Display Point considerations. A possibility to align and position Apex regions

Probably a lot of you will agree with me that when creating a web page, a very important aspect is the way that certain page looks, so that it is as attractive and as easy to understand by the users. APEX, being a tool that actually creates web interfaces needs this aspect covered as well. Therefore it is very important to control the place of the regions that make up the Apex page. This article describes the way the regions can be arranged in an APEX page, and offers a possible solution to align the regions within a page.

Each application has one or more themes attached to it, out of which only one is active, but it can be changed at any point. And each of these themes have several templates pre-defined for pages, tabs, lists, regions, buttons, and so on. All these templates will actually determine how the application pages will look like. The most important templates are probably the page templates, as they determine the region positions.

Continue reading

Setting the number of rows for an Apex SQL Report dynamically. Bug in versions 3.x workaround.

This article describes the way a user can set the number of rows that are displayed for a report. When creating a report region a user can chose to create an interactive report or an SQL report. The interactive reports allow multiple functionalities, and they are very useful for the user. One disadvantage is the fact that an Apex page can contain only one interactive report. Therefore if you want more reports in the same page you will have to create SQL reports.

SQL reports are easy to create, but do not allow all the operations that an interactive report does. Some of them can be created, like the search operation, or computations, but they need extra effort from the developer to build them, while the interactive reports allow these operations with no effort from the developer. While the interactive reports allow you to set the number of rows at any moment while running the Apex page, the SQL reports need some extra development effort.

Continue reading

APEX architecture overview & hacking Oracle XE

In my opinion there are two "must read" articles concerning Oracle APEX. The first, a very interesting overview of the APEX architecture, by Dr. Paul Dorsey at Dulcian Inc.: http://www.dulcian.com/papers/ODTUG/2009/2009_Dorsey_APEX.htm.

The main points to follow in this article:

– APEX is the spark between the PLSQL HTP package and the mod_plsql Apache module. APEX is stored entirely in the database and the web pages are generated using the HTP package and the mod_plsql Apache module. Simple as that!

– APEX does not currently have what we traditionaly call a model layer. A model layer is used to temporary store data between multiple web pages, as required by a stateless web application. The mode-view-controller stored the state of each web page and does a commit just "at the end", resulting in a insert/update/delete. APEX does not have this. The workaround is the items and collections. Not so frequently used, APEX collections (apex_collection) will soon be a must for all complex applications with forms spreading across multiple pages.

The second article is a whitepaper about Hardening and Hacking Oracle XE. The minuses of APEX applications that use Oracle XE db are mainly found in the database. Oracle does not offer support for free products and patches are sparse and sometimes hard to get, if you don't have a metalink account. Proud of your XE database? Think again: it's missing most of the security patches applied to the SE versions…

Podcast: TDEC saved 1 milion $ using APEX!

The Tennessee Department of Environment and Conservation (TDEC) saved the company almost 1 milion $ designing a custom application in Oracle Application Express (APEX). Data stored in different ways, in multiple divisions, centralized using APEX. We can say the APEX is keeping the nature clean, in Tennessee :)

http://streaming.oracle.com/ebn/podcasts/db_insider/media/8228674_Janjic_Brewer_120109.mp3

More on PDF Printing and XSL-FO layouts

In two previous articles we described a robust and low-cost PDF printing architecture for APEX, consisting in the OC4J application servers working as a FOP printing processor for XSL-FO. The downside of this printing configuration is the manual design of Apex Report Layouts and the lack of tools to automatize the design. ApexNinjas.com team has designed a simple, beta-style and rudimentary tool for this scope, called ALGEN.

The possibilities of APEX PDF printing configuration using XSL-FO templates are virtually infinite, but they can be reduced to these simple "must-have" features:

1. Customize the header and the footer of the PDF

2. Display paragraphs, tables and images in the PDF body

3. Add conditional display statements, that allow the rendering of the PDF elements depending on items from the APEX application.

Continue reading

Install ORACLE XE client on Windows XP

Follow these steps to install the Oracle XE Client on Windows XP. This client is used to connect to Oracle XE databases.

1.       Download and install the client from: http://www.oracle.com/technetwork/database/express-edition/downloads/102xewinsoft-090667.html

2.       It will install in c:\XEClient

3.       Create folder c:\XEClient\NETWORK\ADMIN

Continue reading

Navigation bar entries. Creating and managing dynamic navigation bar entries

Navigation bars are another way for the user to navigate through the application, along with tabs, lists or menus. The difference from all the other navigation possibilities is that an application can have only one navigation bar. But obviously all the bar entries can be enabled or disabled depending on the user needs. The navigation bar entries are usually visible on the upper-right corner of the application pages, unless the page template is defined differently to include it elsewhere.

This article describes some of the characteristics of the navigation bar entries and offers an example of how dynamic navigation bar entries can be created.

The application's navigation bar entries can be accessed through the Shared Components section of the application in the Navigation region or from each page in the application through the Navigation Bar region on the bottom right part of the page.

Continue reading