A First Look At XML Publisher

December 1st, 2005 by Mark Rittman

I’ve put my name forward for doing an XML Publisher presentation at the next
BIRT SIG, and as I’ve finished the articles I was writing I’ve got a chance now
to start playing around with the product. Over the next few days I’ll be posting
updates on how I get on with the product, working through the version that’s
available for download now and the sample reports and datasets.

For anyone not familiar with XML Publisher, it’s the new reporting technology
that originally surfaced as part of E-Business Suite and is now available to
license as a separate product. If you’re interested in getting hold of a copy,
you can download it from
http://edelivery.oracle.com
- first select Oracle Application Server
Products, then select your platform, then locate the XML Publisher CD Pack, as
below:

My understanding is that there’s a new release of XML Publisher
due out early next year, but the version you can download now seems to work OK
and is fine for working through the demos. From a licensing perspective, I
understand (although you’ll need to check with your Oracle Rep) it’s $40k per
processor (ouch), $30k if you’ve already licensed Application Server, or $40 per
employee - which is certainly a more palatable option for small-to-medium size
organizations, could make it quite cheap actually. From speaking to a couple of
people the per-processor license should also be seen in the context of the
likely number of processors you’re going to need - XML Publisher doesn’t need a
particularly big server (so I’m told) and so you shouldn’t need to license more
than one or two processors. All this is just stuff I’ve been told though so
don’t take my word on it.

When you download the XML Publisher CD/Media Pack you get a Zip
file containing two directories - XML Publisher Desktop, XML Publisher Server
and a tutorial document. I was thinking first of all that you’d need to install the
server component to get up and running - which requires Apache Tomcat or OC4J
10.1.2 or higher - but you can actually work through all the demos using just
the Desktop component.

The Desktop install is an InstallShield installer that installs
some components into Microsoft Word 2000 or higher. My understanding is that
future releases of XML Publisher Desktop will include Microsoft Excel
components, but for the time being you build all your reports using a Word
add-in. The installer runs simply and with no problems and then opens up the
tutorial document on your desktop:

The basic premise with XML Publisher is this: you use Microsoft
Word (or Excel in the future) to lay out a report template. This could be
something you do yourself, our you could have report templates passed on to you
by someone in the business. You then use the XML Publisher add-in in Word to
load up an XML document containing your data, then pick data elements from the
XML document and add them to the document template, in the same way that you’d
add data to a mail-merge document. You can then preview the output using the
Word add-in, or (I’m guessing here) submit the template and data to the XML
Publisher Server.

Once you’ve installed the Word add-in, when you open up Word you
see an additional menu just below the toolbar. This menu lets you attach an XML
datasource document, add the XML data to your template, set preferences and
preview the output.

The download comes with a number of samples consisting of
templates and XML data. The tutorial starts off with a "customer balance letter"
template and so I worked through this.

The first step is to load the template, which is an RTF (Rich
Text File) format document. Like a mail-merge document there’s placeholders for
the data you’re going to add, and you can add whatever formatting you like.

Next step is to select Data > Load XML Data from the toolbar
menu, then pick up the XML data from a file in the samples directory. Once the
data is loaded, a "Data Loaded Successfully" dialog box comes up and you can then
start adding your data to the template.

To add data items from the XML file into your report, you locate
in the document the placeholder for the field you’re going to add, highlight it
and then select Insert > Field from the toolbar. A dialog box comes up with all
of the available data items, you select the one you want and then press OK, like
this:

You can add repeating rows into your document by selecting
Insert > Table/Form from the toolbar. This brings up a different dialog box that
lets you drag a parent node - in this case, "Invoices" - into the middle
section, which becomes your repeating rows.

 

Whilst this is certainly simpler to set up than repeating rows
in Oracle Reports Builder, I think this bit could do with a bit of tidying up -
when you drag the Invoices folder over to the Template pane, you get presented
with the options "Drop Single Node / Drop All Nodes / Cancel" which might make
sense to an XML programmer but I think would sound a bit strange to a business
user just putting a report together.

Once you’ve done all this you end up with a template document
with all your fields added, like this:

Finally you can then preview it using the Preview toolbar menu
item. You can preview to HTML, PDF, Excel or RTF, all of which works without the
server element installed or running. Here’s how the PDF version looked:

That’s it for now. Back tomorrow with a look at how it handles
SQL data, as well as support for things like bursting and distribution.

Comments

  1. Nuno Souto Says:

    This looks good, Mark. Thanks for the info.
    It is similar to the good old “mail-merge” type of document, which people have been using for ages.
    What I still don’t understand is how does the entire workflow proceed in a normal production sense. Ie, the demo you show above implies the opening of the document, the setting up of the template, the “preview” at the end.
    Now, in a typical reporting situation where the ubiquitous “end user” wants to produce a report from, say, data off a xml web service, what would the actual workflow steps be?

  2. Michael Friedman Says:

    Cool.
    Can it handle images?

  3. Mark Says:

    Nuno,
    Good question about the workflow. That’s the next thing I’ll be looking at, as the way I’ve used it so far is pretty unrealistic - the setting up of the report is how I’d normally do it, but there has to be a way of submitting the report to the server, having it run either on demand or on request, dealing with security and so on. My guess here is that all this “other stuff” is what you’d need to code in your application - all XML Publisher server gives you is a report generation engine and an API to access it. The rest of it is handled by the calling application, such as E-Business Suite, Discoverer 10g or whatever. When I find out more I’ll report back
    Michael - images as in images in the database, in a BLOB? I don’t know, I’ll have to try it out.
    cheers
    Mark

  4. ArunKumar Says:

    Hi,
    I am new to Xml Publisher. Just started working with sample reports in xml publisher.
    Now we are planning to convert our oracle reports
    to xml publisher. Our Reports consists of Many queries(complicated mostly).
    We need some suggestions. Is it adviceable to get the output in preview thru Sql Query or always thru a xml file. which one is more suitable
    Can any Guru’s Help us out of this.
    Thanks in advance

  5. Bernd Eckenfels Says:

    Isnt this supposed to be a Office 2003 Functionality in Word, Excel, Access (and of course Infopath).