Main

APEX Archives

June 6, 2007

Apex Integration I

With the latest release of Applications Express you can now take advantage of direct BIP integration ... welcome APEX to the growing list of applications interfacing with BIP for reporting. I downloaded the latest and greatest and got it installed very easily. The integration relies on having the BIP server running somewhere in your stack and you will need the 10.1.3.2.x version:


Apex:


Configuration


You need to log in as an admin to be able to set up the BIP server. You need to arm yourself with the server and port that BIP is running on. Once you're 'in' navigate to the Home > Manage Service > Instance Settings


Apex1:


Once on the page, get to the 'Report Printing' section about mid way down.


Apex2:


Fill the information required, the protocol, server and port are obvious, for the 'Print Server Script' you need to fill in the following '/xmlpserver/convert '. This is a servlet running on the BIP server that accepts template, data and the output format required and returns the output back to Apex for rendering.


The other important piece you need to check is the 'Standard Support / Advanced Support' radio button. Checking 'Standard' allows you to use the:


  • Standard Support - This is the default setting. It allows you to print report regions and report queries using either the built-in templates provided with Application Express or other formats you create that are in XSL-FO format (not RTF).
  • Advanced Support - If you select this option, for Report Layouts, you can upload your own customized RTF templates for printing reports within Application Express. This option requires the installation of a licensed version of BIP.

For this set of articles we're going to go for, strangely enough, the Advanced Support option.

Commit your changes and you can now log out and get back in as a regular developer in your workspace.


Building Report Queries


Open your application (I used the Demo app) and navigate to the Shared Components. You're going to create a Report Query, I went with a simple customer orders query:

select  "DEMO_CUSTOMERS"."CUST_LAST_NAME" as "CUST_LAST_NAME",
  "DEMO_CUSTOMERS"."CUST_CITY" as "CUST_CITY",
  "DEMO_CUSTOMERS"."CUST_STATE" as "CUST_STATE",
  "DEMO_CUSTOMERS"."CREDIT_LIMIT" as "CREDIT_LIMIT",
  "DEMO_ORDERS"."ORDER_ID" as "ORDER_ID",
  "DEMO_ORDERS"."ORDER_TOTAL" as "ORDER_TOTAL"
 from  "DEMO_ORDERS" "DEMO_ORDERS",
  "DEMO_CUSTOMERS" "DEMO_CUSTOMERS"
 where   "DEMO_CUSTOMERS"."CUSTOMER_ID"="DEMO_ORDERS"."CUSTOMER_ID"

 Apex3:


The XML structure drop down has two choices:
 Standard - this is simple ROWSET/ROW data
 Advanced - this includes session data, you'll get something like this:

<?xml version="1.0" encoding="UTF-8"?>
<DOCUMENT>
    <DATE>05-JUN-07</DATE>
    <USER_NAME>TDEXTER</USER_NAME>
    <APP_ID>100</APP_ID>
    <APP_NAME>APEX - Application Builder</APP_NAME>
    <TITLE>CustomerOrders</TITLE>
    <REGION ID="0">
        <ROWSET>
            <ROW>
               ...
            </ROW>
        </ROWSET>
</DOCUMENT>


You can check the data format for yourself by clicking on the 'Export REport as XML' link in the Tasks pane on the right hand side.

Apex4:

You'll also notice the 'Test Report' link, based on the 'Format' drop list, when you click on the link Apex will make a call to the BIP server using a default layout. This is because we have not defined an RTF or a layout via the Apex interface, check the 'Report Layout' drop list, it only has a single entry, 'Use Generic Report Layout'. NOt the most awe inspiring layout.

Apex5:


Next we'll take a look at building layouts and deploying them.

June 8, 2007

Apex Integration II

In the last article, we dealt with creating the report data, now we'll move on to the creation of layouts for that data. If you remember we were using the Demo application that comes as a default with Apex. I have to admit, I am no Apex expert and I have made an assumption here that those of you reading this are familiar with the Apex product and how to create applications, pages, regions, objects, etc ... if you're not, then just a take a step back and go build some intefaces. Apex really is a very fast environment to build in and very easy to pick up.
 We were in the 'Shared Components' area of our application, now we go into the 'Report Layouts' area and create a new layout.

Apex6:

As you can see there are 3 choices:
Generic Columns (XSL-FO)
 This option is going to take the column headers, widths and other attributes from the Report Region that it is held in. The UI for the layout shows pure XSL-FO code which can be a little daunting. But the Apex folks have done a nice job of allowing you to either get stuck into the XSLFO or to just manipulate the various substitution variables. Such as:

The following are valid substitution strings:


  • #PAGE_HEADER#
  • #PAGE_HEADERFONT_COLOR#
  • #PAGE_HEADER_FONT_FAMILY#
  • #PAGE_HEADER_FONT_SIZE#
  • #PAGE_HEADER_FONT_WEIGHT#
  • #PAGE_FOOTER#
  • #PAGE_FOOTER_FONT_COLOR#
  • #PAGE_FOOTER_FONT_FAMILY#
  • #PAGE_FOOTER_FONT_SIZE#
  • #PAGE_FOOTER_FONT_WEIGHT#
  • #PAGE_WIDTH#
  • #PAGE_HEIGHT#
  • #HEADER_BG_COLOR#
  • #HEADER_FONT_COLOR#
  • #HEADER_FONT_FAMILY#
  • #HEADER_FONT_SIZE#
  • #HEADER_FONT_WEIGHT#
  • #BODY_BG_COLOR#
  • #BODY_FONT_COLOR#
  • #BODY_FONT_FAMILY#
  • #BODY_FONT_SIZE#
  • #BODY_FONT_WEIGHT#
  • #BORDER_WIDTH#

Apex7:


Takes a little finding but the 'Print Attributes' tab for the hosting Report Region is where you can specifiy the various attributes.

Apex8:
 
Named Columns (RTF)

Here you can name your layout and then upload the RTF template you want associated. This method requires that you use the 'Export Report as XML' link I mentioned in the last entry to get some sample XML down to your desktop. You can then use the MSWord plugin to help build the template. There is a link to get the download on the Apex 'Create Report Layout' page.

Apex9:

Named Columns (XSL-FO)

Similar to the RTF templates you can upload raw XSLFO templates. This method, of course can be used when you are using something like Apache FOP for formatting rather than BIP - but we're not going to go there are we :o)

It should be noted here that the templates and report definitions are managed wholly by Apex and are not stored on the BIP server at all. If you take a look at the architecture diagram on the previous article, you'll see the 'Converter Servlet' sitting in the BI Publisher server. This a new piece of functionality for the BIP server that will serve up the output document based on the XML data, layout template and requested format.

Once the templates are loaded you now need to be able to access the report from a page, there are a couple of options with some caveats ... we'll get to that next.


Update


Dimitri left a comment, thankfully with a link to his APEX/BIP integration article, check it out here:


http://dgielis.blogspot.com/


Well worth the read!

December 12, 2007

Apex Integration follow up ...

I covered the basics (very basic) of the APEX integration we have a while back


Apex Integration I
Apex Integration II


Im really please to see the likes of Dmitri picking it up and blogging it, not only about the basics but also exploring the possibilities that are out there to extend the integration further without the need for work from BIP or APEX - less work always sounds good to me.


Check out Dmitri's latest entry on linking to reports via URLs.


Venkat goes a step further starting to investigate the possibilities of integrating with BIP using our web services.


Now if I can persuade one of them to go the whole hog and blog the 'how' of APEX/BIP web services I'll have even less to do ...

Apex Integration follow up ...

I covered the basics (very basic) of the APEX integration we have a while back


Apex Integration I
Apex Integration II


Im really please to see the likes of Dmitri picking it up and blogging it, not only about the basics but also exploring the possibilities that are out there to extend the integration further without the need for work from BIP or APEX - less work always sounds good to me.


Check out Dmitri's latest entry on linking to reports via URLs.


Venkat goes a step further starting to investigate the possibilities of integrating with BIP using our web services.


Now if I can persuade one of them to go the whole hog and blog the 'how' of APEX/BIP web services I'll have even less to do ...

March 31, 2008

APEX and BIP Web Services

Check out Tyler's post on using BIP web services to integrated BIP and Application Express: Call BI Publisher Web Services from APEX

APEX and BIP Web Services

Check out Tyler's post on using BIP web services to integrated BIP and Application Express: Call BI Publisher Web Services from APEX

July 7, 2009

APEX integration with Publisher Web Services

At ODTUG a few weeks back I saw Marc Sewtz's excellent presentation on the integration between Oracle Application Express (APEX) and BI Publisher. Lots of good examples and tips.

He mentioned a recent white paper on integrating Publisher with APEX via the Publisher web services by Jason Straub. Delighted to see this. Trying to pull it all together in one place, here is a collection of great references for APEX developers wanting to integrate with BI Publisher.

PDF Printing in APEX
from the APEX OTN pages

Apex Integration I
and
Apex Integration II
by Tim

Calling BI Publisher report from APEX via URLs
by Dimitri

BI Publisher Web Services and APEX
by Venkat

Call BI Publisher Web Services from APEX
by Tyler

and the most recent addition to the series ...

Integrating Oracle Application Express with BI Publisher
white paper by Jason

A fine example of evolutionary collaboration.

Thank you all.

September 8, 2009

APEX & BIP via Web Services

Just got off a call with Tyler Muth, APEX meister. He just dropped me a link to an excellent white paper on hooking up an APEX app with BIP using BIP's web service layer.

this is not the out of the box integration but fully functioning log into BIP, navigate folders, pick a report and run it.

http://www.oracle.com/technology/products/database/application_express/packaged_apps/integration.html

Enjoy APEXers!

About APEX

This page contains an archive of all entries posted to Oracle BI Publisher Blog in the APEX category. They are listed from oldest to newest.

BIEE is the next category.

Many more can be found on the main index page or by looking through the archives.

Top Tags

Powered by
Movable Type and Oracle