Here is a very simple example of XML code that you can copy into notepad and save as example1.xml
<?xml version="1.0"?>
<!-- Generated by Oracle Reports version 6.0.8.25.0 -->
<EXAMPLE1>
<LIST_G_MAIN_SELECT>
<G_MAIN_SELECT>
<VENDOR_NAME>BIPgirl</VENDOR_NAME>
<VENDOR_ID>00001</VENDOR_ID>
<VENDOR_LINE>1 BIPgirl Lane </VENDOR_LINE>
<VENDOR_CITY>Albany</VENDOR_CITY>
<VENDOR_STATE>NY</VENDOR_STATE>
</G_MAIN_SELECT>
</LIST_G_MAIN_SELECT>
</EXAMPLE1>
Once saved, in MS Word you go to your newly added toolbar and load the file. Select Load XML Data and then browse to example1.xml
You will get a message acknowledging that the data was loaded successfully. Then.. let the development begin!
For my first practice template, I went to the Insert Menu on the Template Builder toolbar and selected the Table/Form option. This is a quick and easy way to get the fields from your data file into your template with the correct syntax. If you select the top node from the data source pane and drag it to the template pane, you can drop all the nodes or selected ones. For this example I will just drop all the nodes and not touch any settings.
Your template will look like this :
Well that's fine and dandy, what will my user see? Another great feature of the XML Publisher Desktop Plug-in is that you can preview your output without loading it into the Apps. You must first save your template as Example1.rtf and then you can navigate back to our handy toolbar. You will see a Preview Menu on it.

This preview menu gives you 4 options for your output (PDF, HTML, EXCEL or RTF). Because my output in the Apps will be PDF, that is what I will choose to preview in.
Here is our first report!
Woo hoo! It may not look pretty, but we merged the data layer with the presentation layer on our desktop and after all, that is our goal here. In my next post I will show you how we can add our own personal touches to the output. Go ahead and give it a try!
For my first practice template, I went to the Insert Menu on the Template Builder toolbar and selected the Table/Form option. This is a quick and easy way to get the fields from your data file into your template with the correct syntax. If you select the top node from the data source pane and drag it to the template pane, you can drop all the nodes or selected ones. For this example I will just drop all the nodes and not touch any settings.
Your template will look like this :
Well that's fine and dandy, what will my user see? Another great feature of the XML Publisher Desktop Plug-in is that you can preview your output without loading it into the Apps. You must first save your template as Example1.rtf and then you can navigate back to our handy toolbar. You will see a Preview Menu on it.

This preview menu gives you 4 options for your output (PDF, HTML, EXCEL or RTF). Because my output in the Apps will be PDF, that is what I will choose to preview in.
Here is our first report!
Woo hoo! It may not look pretty, but we merged the data layer with the presentation layer on our desktop and after all, that is our goal here. In my next post I will show you how we can add our own personal touches to the output. Go ahead and give it a try!



3 comments:
Great to have another BIP site, thanks! I'm just starting out and often run into little issues that send me running to the Bipblogs to solve. Just the other day, I had trouble with the syntax for testing whether an element is null, as if an empty VENDOR_LINE2 tag was in your example. I found that the test in the documentation didn't work, but someone had the little piece I was missing.
All that to say, you're on my bookmarks and I welcome you! (You'll note that I blog on entirely different things - all work, no play, etc.)
Thank you for the warm welcome! I will do my best keep the BIP info flowing for you and I'll check out your blog as well.
Hi BIPGirl,
I don't know how I stumbled on this site, but BIP/XML Publisher seems to be the tool I could use in one of my projects where I need to generate Word documents filled up with data from the DB. What a chance! Next step was downloading XMLPublisher through the link you provided. However I fail to get example1 working as it should. After creating the table form your sample shows 3 for-each constructs. These are not generated on my PC. Instead I see just curly braces. Can you figure out what went wrong?
Thanks,
Stefan
Post a Comment