Skip to Main Content

Apex Office Print (AOP)

Some info on Apex Office Print (AOP). The offical documentation can be found here.

Barcodes

When using Code 39 for barcodes, you may run into this error message:
Code 39 must contain only digits, capital letters, spaces and the symbols -.$/+%

This regexp_replace will take care of the conversion:

JSON

AOP uses JSON as its data source, so for JSON information that may be relevant for AOP, please visit my JSON page.
E.g. the "XML to JSON" article shows a nice example of correct generated JSON that is not 100% compatible with AOP.

ORA-19202

If you get an "ORA-19202: Error occurred in XML processing ORA-01858: a non-numeric character was found where a numeric was expected", then maybe you provided AOP with a query that returns 0 rows.
In PL/SQL the fact you have 0 rows is probably easy enough to fix, but on an Apex page with a report and an "AOP Print" button that is a bit trickier.

You can check out these links for info on how to check if a report returns 0 rows. Then you can use that info to elegantly disable (or hide) the Print button:
https://forums.oracle.com/ords/apexds/post/display-region-classic-report-as-function-only-if-rows-retu-1251.
http://www.grassroots-oracle.com/2013/12/count-number-of-rows-returned-in-apex.html.

Column CSS

If you use the AOP DA Plug-in to create an Excel or PDF of a report with a column that has an HTML Expression, you may end up with a column containing only red text.

In this example, the Ename column is either green or blue because of the <span #CSS#>#ENAME#</span> HTML Expression, and AOP creates correct output in this case.
Note that the Display Type for the Ename column has been set to "ESCAPE_SC (Escape special characters)".
If you do not select the "Escape special characters" option for this column, AOP cannot process it correctly for some reason, and it turns the text red (which is probably AOP's way of warning you, but in my original report red was one of the colors I wanted to show, so that was not obvious at all...).
I expected the "Escape special characters" option to apply only to the column value itself, not to the HTML Expression. Escaping an HTML Expression doesn't make much sense really, so this looks like a little bug in AOP.

Column CSS IR

EmpnoEnameDeptno
7876ADAMS20
7499ALLEN30
7698BLAKE30
7782CLARK10
7902FORD20
  • 1 - 5

may look like this in AOP

EmpnoEnameDeptno
7876ADAMS20
7499ALLEN30
7698BLAKE30
7782CLARK10
7902FORD20
  • 1 - 5

Code

Region

Identification
Sequence
Title
Type
Source
Source Type
Region Source

Report Column

Column Definition
Column Name
Display Type
HTML Expression
Column Heading

Report Column

Column Definition
Column Name
Display Type
HTML Expression
Column Heading

Report Column

Column Definition
Column Name
Display Type
Column Heading