<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
   <channel>
      <title>Oracle BI Publisher Blog</title>
      <link>http://blogs.oracle.com/xmlpublisher/</link>
      <description>a blog for all things bip ...</description>
      <language>en</language>
      <copyright>Copyright 2009</copyright>
      <lastBuildDate>Thu, 05 Nov 2009 10:10:10 -0700</lastBuildDate>
      <generator>http://www.sixapart.com/movabletype/</generator>
      <docs>http://blogs.law.harvard.edu/tech/rss</docs> 

      
      <item>
         <title>Indenting Trees</title>
         <description><![CDATA[<p><big>T</big>he <a href="http://blogs.oracle.com/xmlpublisher/2009/10/siebel_integration_information.html">snow </a>has nearly all gone, just in time for the next batch! It was a douzy of a storm, fun driving conditions, amazing how much you forget over the hot dry 'roaded' summer. My newly licensed son was itching to get out there. Mom wouldn't let him, I had to agree, our insurance couldn't take it and we have way too many trees near our house. The trees looked very pretty thou and speaking of trees (what a segue) I have been asked numerous times if BIP can generate a tree structure, the more ambitious ask for an org chart. I plan to take a look at how to do the org chart another time, for now, how about a nice tree structure.</p>

<p>Between the two of us, Rob (colleague and data modeler extraordinaire) came up with a solution for a customer to generate this:</p>

<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="Tree1.jpg" src="http://blogs.oracle.com/xmlpublisher/images/Tree1.jpg" width="280" height="326" class="mt-image-center" style="text-align: left; display: block; margin: 0 auto 20px;" /></span></p>

<p>Its a tree of sorts, nothing fancy, we just wanted to get the structure right, so there are no details under the headings. Its getting the indenting correct that was the trick. The customer had a pretty fixed data structure and did not want to use nested tables.</p>

<p>The template is pretty simple, just a funky trick to get the indenting working. I mentioned the customer had a pretty fixed data structure. It made life easier, they only had 3 levels to worry about so the code to handle the indenting could be pretty straightforward and somewhat 'hard coded' for the data set.</p>

<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="tree4.jpg" src="http://blogs.oracle.com/xmlpublisher/images/tree4.jpg" width="583" height="379" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></span></p>

<p>It also has the advantage that the tree is in the right order ie</p>

<p>Level1<br />
-Level2<br />
-Level2<br />
-- Level3<br />
-Level2<br />
Level1<br />
Level1<br />
...</p>

<p>The template looks like this </p>

<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="Tree2.jpg" src="http://blogs.oracle.com/xmlpublisher/images/Tree2.jpg" width="268" height="125" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></span></p>

<p>the fields contain</p>

<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="Tree3.jpg" src="http://blogs.oracle.com/xmlpublisher/images/Tree3.jpg" width="656" height="353" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></span></p>

<p>Of course the most interesting field is the C</p>

<p>&lt;?if:number(LEVELS)=1?&gt;<br />
 &lt;?ORG_LONG_NAME?&gt;<br />
&lt;?end if?&gt;<br />
&lt;?if:number(LEVELS)=2?&gt;<br />
 &lt;?attribute@inblock:start-indent;'20.0pt'? &gt; &lt;?ORG_LONG_NAME?&gt;<br />
&lt;?end if?&gt;<br />
&lt;?if:number(LEVELS)=3?&gt;<br />
 &lt;?attribute@inblock:start-indent;'30.0pt'?&gt; &lt;?ORG_LONG_NAME?&gt;<br />
&lt;?end if?&gt;</p>

<p>A chhose statement would have worked just as well. You can see the dependence on the data order and the structure or more specifically LEVELS element. We need to check that to know how big the indentation should be.<br />
The @block is also important, we need that to get the indentation to show only on the current text and not affect anything else. If we had been using tables we could have gotten around that.<br />
Now we could have been a little smarter and written something to handle any number of levels ... answers on the back on a new Mac Book Pro 15-inch: 2.8GHz 4Gb 500Gb HD :0)</p>]]></description>
         <link>http://blogs.oracle.com/xmlpublisher/2009/11/dynamic_indents.html</link>
         <guid>http://blogs.oracle.com/xmlpublisher/2009/11/dynamic_indents.html</guid>
        
          <category domain="http://www.sixapart.com/ns/types#category">RTF</category>
        
          <category domain="http://www.sixapart.com/ns/types#category">XSL/XPATH</category>
        
        
         <pubDate>Thu, 05 Nov 2009 10:10:10 -0700</pubDate>
      </item>
      
      <item>
         <title>Siebel Integration Information</title>
         <description><![CDATA[<p>Been too danged busy again, we got a nice 2-3ft of snow over the last two daze, digging out has been fun! Nearly lost the car ...</p>

<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="car.jpg" src="http://blogs.oracle.com/xmlpublisher/images/car.jpg" width="604" height="453" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></span></p>

<p>A quick Friday post on Siebel integration. Two pretty useful docs that John from the Siebel PM team recently shared with me.</p>

<p>8.1.1 TOI: Siebel BI Publisher Integration Functional Overview</p>

<p>   <a href="http://oukc.oracle.com/static05/opn/login/?c=576002953&t=offering">http://oukc.oracle.com/static05/opn/login/?c=576002953&t=offering</a></p>

<p>Siebel Reporting Migration FAQ - Actuate and BI Publisher (external visible)</p>

<p><a href="https://metalink3.oracle.com/od/faces/secure/km/DocumentDisplay.jspx?id=764097.1">https://metalink3.oracle.com/od/faces/secure/km/DocumentDisplay.jspx?id=764097.1</a></p>

<p>Have a good weekend</p>]]></description>
         <link>http://blogs.oracle.com/xmlpublisher/2009/10/siebel_integration_information.html</link>
         <guid>http://blogs.oracle.com/xmlpublisher/2009/10/siebel_integration_information.html</guid>
        
        
         <pubDate>Fri, 30 Oct 2009 13:56:57 -0700</pubDate>
      </item>
      
      <item>
         <title>Installing BI Publisher into Weblogic Server 11g</title>
         <description><![CDATA[<p>Thursday, October 22nd, 2009 by Mark Rittman</p>

<p>I was on-site yesterday helping an ISV integrate BI Publisher into their product, and hit a few issues getting the product installed and running on the Weblogic application server. BI Publisher comes integrated out-of-the-box with OC4J and Oracle Application Server, but you'll need to install and configure it manually to work with other application servers [...]</p>

<p>You can read the full article <a href="http://www.rittmanmead.com/2009/10/22/installing-bi-publisher-into-weblogic-servier-11g/">HERE</a>.</p>

<p>Many Thanks to Mark for his posting.<br />
</p>]]></description>
         <link>http://blogs.oracle.com/xmlpublisher/2009/10/installing_bi_publisher_into_w.html</link>
         <guid>http://blogs.oracle.com/xmlpublisher/2009/10/installing_bi_publisher_into_w.html</guid>
        
          <category domain="http://www.sixapart.com/ns/types#category">Installation &amp; Administration</category>
        
        
         <pubDate>Fri, 23 Oct 2009 17:08:43 -0700</pubDate>
      </item>
      
      <item>
         <title>Row Filler Followup</title>
         <description><![CDATA[<p>Since my post last week or was it the week before. The weeks are blurring by at the moment. Last week, I could swear it was warm and sunny here in Colorado, the fish were biting along with the mozzies and sitting on our deck you could here the 'crickets' chirping into the night. Back in July, we got nightly visits from a huge bear which I managed to capture on film. He was a sausage stealing, trash tipping pain in the butt but we were not going to argue :0)</p>

<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://blogs.oracle.com/xmlpublisher/images/bear.jpg"><img alt="bear.jpg" src="http://blogs.oracle.com/xmlpublisher/assets_c/2009/10/bear-thumb-600x450-1644.jpg" width="600" height="450" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></a></span></p>

<p>Now its 27F, sorry 'Rest of the Worlders', I have been assimilated. Its imperial measurements for me all the way. I even know what a 'quart' is, I think in inches and cups for measuring. America is sometimes staggering in its arrogance for the rest of the world! Maybe a bit strong but you know what I mean.<br />
 Yep, its freezing cold the wind is howling, the windshield (another Americanism along with tail pipe, thats a good one) blower on the car can not keep up with the freezing rain and I have to scrape it to see. Come back Summer, maybe not the bear thou!</p>

<p>Anyhoo, my last post on <a href="http://blogs.oracle.com/xmlpublisher/2009/10/row_filler.html">row filling </a>and the added requirement that I did not cover got some folks into action. Most notably, Lakshmanan and the Ice Man aka Ike Wiggins. Both of them were way ahead of me. I guess from a need, born of necessity i.e. get it done for a customer. Rather than my approach of, 'when I can find time', they have independently come up with solutions to handle the row wrapping issue I mentioned at the end of the last post.</p>

<p>Shout outs are due and if you use their methods, please drop a quick mail of thanks.</p>

<p>Lakshmanan's solution is available <a href="http://www.oorch.com/2009/10/06/how-to-handle-fixed-row-with-text-wrapping-in-bi-desktop-publisher/">here</a>. Some other great posts on EBS related tidbits (another PC'ed American term) available on his blog.</p>

<p>Ike's solution is available <a href="http://bipublisher.blogspot.com/2009/08/bi-publisher-advanced-line-wrapping.html">here </a> Ike has also posted sample template and data <a href="http://web.me.com/beth.wiggins/ike/bipublisher/LIMITING%20TEXT%20PER%20ROW.zip">here</a>. Like the blog's new look and feel Ike, very suave!</p>]]></description>
         <link>http://blogs.oracle.com/xmlpublisher/2009/10/since_my_post_last_week.html</link>
         <guid>http://blogs.oracle.com/xmlpublisher/2009/10/since_my_post_last_week.html</guid>
        
          <category domain="http://www.sixapart.com/ns/types#category">RTF</category>
        
          <category domain="http://www.sixapart.com/ns/types#category">XSL/XPATH</category>
        
        
          <category domain="http://www.sixapart.com/ns/types#tag">fixed row</category>
        
          <category domain="http://www.sixapart.com/ns/types#tag">row wrapping</category>
        
         <pubDate>Fri, 16 Oct 2009 08:08:08 -0700</pubDate>
      </item>
      
      <item>
         <title>OOW 2009 Drawing to a Close</title>
         <description><![CDATA[<p>One more day to go at Open World 2009.  It's been quite the busy week both with sessions and at the demopod.  </p>

<p>Even though each of us were scheduled to be at the pod for a few hours each day, we found ourselves staying longer and longer because there were just so many folks to talk to.  In fact, Glenn from Show Management came by the pod first thing this morning to tell us that the BI Publisher demopod had some pretty significant numbers the day before.  We really stood out.  This would explain why most of us are now losing our voices.  But, that's what we get for being so excited to talk at length about our fabulous product! </p>

<p>Sadly, the demogrounds are now closed.  But, we still have sessions tomorrow.</p>

<p>You won't want to miss Nick & Klaus at 12pm in Moscone West 3014.  They'll be educating you on Best Practices for BI Publisher.</p>

<p>There are also sessions on E-Business Suite, Peoplesoft, Siebel and the last hands on JD Edwards lab.  Stop by and check them out.</p>

<p>  </p>]]></description>
         <link>http://blogs.oracle.com/xmlpublisher/2009/10/oow_2009_drawing_to_a_close.html</link>
         <guid>http://blogs.oracle.com/xmlpublisher/2009/10/oow_2009_drawing_to_a_close.html</guid>
        
        
         <pubDate>Wed, 14 Oct 2009 21:09:33 -0700</pubDate>
      </item>
      
      <item>
         <title>Neither Rain, Nor Sleet ...</title>
         <description><![CDATA[<p>... nor gloom of night stays these couriers from the swift completion of their appointed rounds."   Don't know if it's still true for the US Mail but, the Publisher team was on the go despite the <a href="http://www.sfgate.com/cgi-bin/article.cgi?f=/c/a/2009/10/13/MNL81A4SDF.DTL">"epic" storm in San Francisco</a> today.</p>

<p>Siva Ramanathan from <a href="http://www.mastercard.com/us/company/en/index.html">MasterCard</a> and Noelle <br />
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="Siva-Noelle.png" src="http://blogs.oracle.com/xmlpublisher/Siva-Noelle.png" width="335" height="186" class="mt-image-none" style="" /></span><br />
gave a great session on Publisher in E-Business Suite, PeopleSoft, Siebel, JD Edwards EnterpriseOne, and JD Edwards World.  </p>

<p>Siva gave a great demonstration of using the BI Publisher Template Builder.  He also told the story of how it used to take a business analyst, an IT developer, and a consultant from the vendor of their 3rd party tool <strong>THREE MONTHS</strong> to create a new PO or modify an existing one (like changing the signature) - and this was happening across 50 operating units.  Now, using BI Publisher, it takes a business analyst <strong>only THREE DAYS </strong>to create a new PO or implement changes and does not require the intervention of IT nor anyone else.  Imagine ... <em>30 times faster implementation time with 1/3 the people</em> to create or edit a Purchase Order ... <em>Priceless</em>.  </p>

<p>Noelle, the superwoman of many hats, covered each Application's integration with Publisher and an update of what's new and planned for each.  The audience was hanging on her every word when they weren't laughing at her jokes.</p>

<p>There was a little less traffic at the demo pod today ... possibly due the storm but, Fethiye, Leslie, Noelle, Alin, Klaus, Nikos and Pradeep kept the demos going all day long.  And of course, Osama-bey, the inspiration behind the innovation, was there to pitch in as needed.</p>

<p>Also saw a presentation packed with lots of great details on using Publisher in PeopleSoft by Millie Babicz and Todd Kummer of <a href="http://www.spearmc.com/">SpearMC Consulting</a>.</p>

<p>Coming up on Wednesday::</p>

<p></p>

<p></p>

<p></p>

<p><br />
<ul><br />
	<li>S308767 Innovations Using Oracle XML Publisher<br />
Manoj Chitre, Claremont Graduate University<br />
Moscone West L3 Room 3005<br />
1:45 pm - 2:15 pm</li><br />
	<li>S310889 Creating Custom Siebel Reports, Using Oracle Business Intelligence Publisher<br />
John Bedford, Oracle; Pradeep Sharma, Oracle	<br />
Moscone West L2 Room 2009<br />
1:45 pm - 2:15 pm<br />
</li><br />
	<li>S311667: Modernize JD Edwards EnterpriseOne Reports with Embedded Oracle Business Intelligence Publisher	<br />
Gurbinder Bali, Oracle; Jeff Erickson, Oracle; Michael Zheng, Oracle<br />
Marriott Hotel Golden Gate A1<br />
5:00 pm - 6:00 pm<br />
</li><br />
</ul><br />
</p>]]></description>
         <link>http://blogs.oracle.com/xmlpublisher/2009/10/neither_rain_nor_sleet.html</link>
         <guid>http://blogs.oracle.com/xmlpublisher/2009/10/neither_rain_nor_sleet.html</guid>
        
          <category domain="http://www.sixapart.com/ns/types#category">Applications</category>
        
          <category domain="http://www.sixapart.com/ns/types#category">E Business Suite</category>
        
          <category domain="http://www.sixapart.com/ns/types#category">JD Edwards</category>
        
          <category domain="http://www.sixapart.com/ns/types#category">PeopleSoft</category>
        
          <category domain="http://www.sixapart.com/ns/types#category">Siebel</category>
        
        
         <pubDate>Wed, 14 Oct 2009 00:53:53 -0700</pubDate>
      </item>
      
      <item>
         <title>Convert Today, Rain Tomorrow</title>
         <description><![CDATA[<p>There seemed to be a fair amount of questions today at the demo pod around converting from Actuate/Crystal/Oracle Reports to BI Publisher.  Allow me to point out where you can find tools and/or information to make your conversion to BI Publisher a little smoother.<br><br />
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://blogs.oracle.com/xmlpublisher/corey_n_ike.jpg"><img alt="corey_n_ike.jpg" src="http://blogs.oracle.com/xmlpublisher/assets_c/2009/10/corey_n_ike-thumb-303x146-1717.jpg" width="303" height="146" class="mt-image-left" style="float: left; margin: 0 20px 20px 0;" /></a></span><br />
To convert Oracle Reports to BI Publisher, Ike Wiggins demo'd a cool little conversion utility at a session this afternoon.  <a href="http://bipublisher.blogspot.com/2009/05/bi-publisher-reports6i-to-bip.html">Check out his blog</a>, where you'll find the download, a little tutorial and FAQs.</p>

<p>To convert Crystal Reports to BI Publisher, sorry, no utility here.  But, check out the <a href="http://download.oracle.com/otndocs/xmlp/CrystaltoBIP.pdf">white paper on the OTN</a>.  We heard from Corey at Gallup today on how they were able to convert their Crystal reports to BI Publisher.    </p>

<p>To convert Actuate Reports to BI Publisher, there's a conversion utility.  Just do a search on My Oracle Support for patch # 8288024.</p>

<p>And now for what's coming tomorrow....</p>

<p>Well, if you believe the forecast, I suggest a raincoat, umbrella, galoshes...you know, those awful black rubber boats you had to wear as a kid.  I hear we're in for a lot of the wet stuff.  Hopefully,  the anticipated precipitation doesn't stop people from making it to the session over at the Westin where we'll be talking about how E-Business Suite, JD Edwards, Peoplesoft and Siebel use BI Publisher to produce those pixel perfect reports.  </p>

<p>If you're at the Marriott, you might want to check out Paul Rodwick's session on the Oracle BI Roadmap and Strategy.  Check out where Oracle BI's headed.  </p>

<p>And, yes, there's another one of the JD Edwards hands on labs too.<br />
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://blogs.oracle.com/xmlpublisher/golf.jpg"><img alt="golf.jpg" src="http://blogs.oracle.com/xmlpublisher/assets_c/2009/10/golf-thumb-210x109-1715.jpg" width="210" height="109" class="mt-image-right" style="float: right; margin: 0 0 20px 20px;" /></a></span><br />
If you just want to stay high and dry, come over to Moscone West and play a little golf at the Callaway Experience.  </p>

<p>Did I mention, the BI Publisher demo pod is really, really close to the Callaway Golf Experience?  No?  Well, it is.  We're in the back on the right, Pod W-083.  Our knowledgeable BI Publisher team will be on hand to show you demos and answer your questions.   <br />
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://blogs.oracle.com/xmlpublisher/demopod_monday.jpg"><img alt="demopod_monday.jpg" src="http://blogs.oracle.com/xmlpublisher/assets_c/2009/10/demopod_monday-thumb-399x222-1720.jpg" width="399" height="222" class="mt-image-right" style="float: center; margin: 0 0 20px 20px;" /></a></span></p>]]></description>
         <link>http://blogs.oracle.com/xmlpublisher/2009/10/convert_today_rain_tomorrow.html</link>
         <guid>http://blogs.oracle.com/xmlpublisher/2009/10/convert_today_rain_tomorrow.html</guid>
        
        
         <pubDate>Mon, 12 Oct 2009 23:39:14 -0700</pubDate>
      </item>
      
      <item>
         <title>Racing Boats &amp; Egg Chairs</title>
         <description><![CDATA[<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="bmw_racing_boat.jpg" src="http://blogs.oracle.com/xmlpublisher/bmw_racing_boat.jpg" width="240" height="320" class="mt-image-left" style="float: left; margin: 0 20px 20px 0;" /></span><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://blogs.oracle.com/xmlpublisher/leslie_eggchair.jpg"><img alt="leslie_eggchair.jpg" src="http://blogs.oracle.com/xmlpublisher/assets_c/2009/10/leslie_eggchair-thumb-192x256-1676.jpg" width="192" height="256" class="mt-image-right" style="float: right; margin: 0 0 20px 20px;" /></a></span></p>

<p>For all of you coming into town for Open World this year, fun and cool stuff awaits.</p>

<p>On display just outside of the Yerba Buena Gardens is the Oracle BMW Racing Boat.  You can't miss it on your way over to Moscone West, which by the way is where the BI Publisher demopod resides this year.  We're in the back, on the right, Pod W-083.  </p>

<p>On your way to visit us at the demopod, you might want to partake in the awesome games at the Blackberry Digital Playground.  There you'll find the old style arcade video games, like Donkey Kong and Ms. Pacman.  In addition to the games, you'll also find some groovy furniture, a la Mork-n-Mindy.  Remember the egg chair?  Well, they have those!  Leslie (THE BIP Documentation guru) and I tried a couple out and believe it or not, they are super comfy!  We're trying to figure out how to snag a couple for the BI Publisher pod...</p>

<p>In addition to finding us at the demopod Monday, you'll find...</p>

<p>Product Manager Extraordinaire, Mike Donohue, giving his ever popular Introduction to BI Publisher at 1pm over at the Marriott.<br />
 <br />
For the BIP Road Map and Features, head on over to the Marriott at 4pm.  On tap to be there is the father of BIP himself, Osama Elkady.  He'll be joined by the very knowledgable Klaus Fabian and of course, PM Mike.</p>

<p>Want to learn how to convert your Oracle Reports, Crystal and Actuate Reports to BI Publisher?  Well, you're in luck....BIP PM Pradeep Sharma along with<a href="http://bipublisher.blogspot.com/"> Ike Wiggins</a> and Cory Keogh (from Gallup)   will tell you all about it at 5:30pm at the Marriott.</p>

<p>If you're looking to get your hands on BI Publisher with JD Edwards, there are 4, count em 4, hands on labs this week.  I heard these were filling up fast, so you might want to pre-enroll quickly to ensure you get a spot.</p>

<p>Want to see a demo or talk to us about the product?  We'd be happy to chat with you down at the demopod.  Please stop by and see us!</p>]]></description>
         <link>http://blogs.oracle.com/xmlpublisher/2009/10/racing_boats_egg_chairs.html</link>
         <guid>http://blogs.oracle.com/xmlpublisher/2009/10/racing_boats_egg_chairs.html</guid>
        
          <category domain="http://www.sixapart.com/ns/types#category">BI Publisher Enterprise</category>
        
        
         <pubDate>Sun, 11 Oct 2009 21:38:26 -0700</pubDate>
      </item>
      
      <item>
         <title>Row Filler</title>
         <description><![CDATA[<p>Having a good discussion on the forum regarding fixed row enumeration. Maybe you have a fixed height for a table on some pre-printed stationary. I have <a href="http://blogs.oracle.com/xmlpublisher/2007/03/anatomy_of_a_template_i_fixed.html">documented </a>a way to fix the number of rows on a page a few years back. the twist to the requirement is that if I have 'line' data that will not fit on a single row and needs to wrap then where I might have had room for 10 rows on the paper output, because of the string wrapping I only now have the physical room, on the paper for 6 rows. But my original logic did not allow for this.</p>

<p>I don't have the answer to that piece yet, looking into it. Development, well template meister Hok Min has a doozy of an enhancement for the 11g release. True fixed table height support, you need a 5inch high table filled with as many rows as will or will not fit? Hok Min has the command. But you'll have to wait for 11g. When is that coming? Sometime within the next calendar year is the official line, unofficially, sooner rather than later - see you are still in the dark, gotta cover my a$$.</p>

<p>Back on the fixed row, I got a requirement this week to fill out empty rows in a table if the amount of data was not enough. Its its still fixed rows, you just want to show them. Rather than the solution I showed a few years back I found a new and groovy way to do it. The good ol for...next loop. Where's that documented then? Its in there, just tucked a away with the shape support.</p>

<p>It showed itself recently in my '<a href="http://blogs.oracle.com/xmlpublisher/2009/09/groovy_date_functions.html">date</a>' post and I have used it again this week.</p>

<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="fornext.jpg" src="http://blogs.oracle.com/xmlpublisher/images/fornext.jpg" width="648" height="134" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></span> </p>

<p>Normal table to render the 'line' data, the next two fields. The variable field, numRows Variable:</p>

<pre>&lt;?variable:numRows;number(12)?&gt;</pre>

<p>just stores a value for the number of rows you want to show. You can hard code this value too, if you would like. The next field:</p>

<pre>&lt;?for-each:xdoxslt:foreach_number($_XDOCTX, 1,numRows-count(.//G_TEC_ID1),1)?&gt;</pre>

<p>All this is doing is using a command to effectively give me a for...next loop, starting at 1 up to  12(variable value) - the number of rows in the G_TEC_ID1 group with a step of 1</p>

<p>Then I have an empty nested table with zero cell borders to get it to butt up to the edges of the parent table and some selective borders showing.</p>

<p>The next field closes out the filler - &lt;?end for-each?&gt;</p>

<p>Much faster to develop than the original, neater too. Will be looking into the wrapping rows issue over the next few daze as time permits.</p>]]></description>
         <link>http://blogs.oracle.com/xmlpublisher/2009/10/row_filler.html</link>
         <guid>http://blogs.oracle.com/xmlpublisher/2009/10/row_filler.html</guid>
        
          <category domain="http://www.sixapart.com/ns/types#category">RTF</category>
        
        
          <category domain="http://www.sixapart.com/ns/types#tag">fixed row</category>
        
         <pubDate>Tue, 06 Oct 2009 08:08:08 -0700</pubDate>
      </item>
      
      <item>
         <title>New BIP World Record</title>
         <description><![CDATA[<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="guinness.jpg" src="http://blogs.oracle.com/xmlpublisher/images/guinness.jpg" width="272" height="256" class="mt-image-left" style="float: left; margin: 0 20px 20px 0;" /></span>I have seen some big reports in my time. There was the monster German Asset Summary report that I narrowly escaped having to maintain not long after I joined Oracle UK more than 11 years ago now. I say 'was', it got canned because it was bending Oracle Reports to do things it just did not want to do.</p>

<p><a href="http://forums.oracle.com/forums/profile.jspa?userID=647864">Alok</a> beats all known contenders into a cocked hat, with his 'Annual Cotton Report', it contains, ready for this? 200 data templates, not just queries, data templates! It tips the scales at a meaty 3 Mb! </p>

<p>He was understandably having problems getting the report to load into the report builder. Hide from the development team to the rescue with a little javascript goodness. If you have a monster report and its not loading here's the tip.</p>

<p>You need to update XDOReportModel.TIMEOUTMSEC value in the javascript library XDOReportModel.js</p>

<p>You'll find it J2EE_HOME/applications/xmlpserver/xmlpserver/js/XDOReportModel.js</p>

<p>I got Alok's report to load by setting it thus:</p>

<pre>XDOReportModel.TIMEOUTMSEC = 10000;</pre>

<p>You will need to clear your browser cache to get the change picked up.</p>

<p>Please note, you are customizing at this point and Oracle Support, as fantastic as they are, can not help you if you screw up. Please back up the js library before you make any changes. Yep, it ought to be exposed as a parameter for the report builder but its not right now. I dont think the team ever imagined a 200 data template report.</p>

<p>A value of 10000 gives a 10 second time out but the report loads in about 7 seconds on my laptop.</p>

<p>If you have anything to challenge Alok's colossal cotton report or even a mini monster. Would love to hear about them. Not just in terms of queries but also in terms of size. </p>

<p>Guinness are currently ratifying Alok's mondo record report. I think I would need a pint or three of the black stuff after putting that together!</p>]]></description>
         <link>http://blogs.oracle.com/xmlpublisher/2009/09/new_world_bip_record.html</link>
         <guid>http://blogs.oracle.com/xmlpublisher/2009/09/new_world_bip_record.html</guid>
        
          <category domain="http://www.sixapart.com/ns/types#category">BI Publisher Enterprise</category>
        
          <category domain="http://www.sixapart.com/ns/types#category">Data Templates</category>
        
        
         <pubDate>Mon, 28 Sep 2009 08:08:08 -0700</pubDate>
      </item>
      
      <item>
         <title>Focus on BI Publisher - Oracle OpenWorld 2009</title>
         <description><![CDATA[<p>Each Fall it's exciting to see the Oracle homepage <a href="http://www.oracle.com/index.html" target="_blank">www.oracle.com</a> announcing all of the exciting events planned for Oracle Open World. For anyone who is still on the fence about attending, you still have time. The registration is still on for this mega conference. </p>

<p>And if you have registered, do not miss out on BI Publisher events. Please check out the <a href="http://www.oracle.com/technology/products/xml-publisher/docs/FocusOnBIPublisher_OOW2009.pdf" target="_blank">Focus On BI Publisher</a> document that lists all the sessions featuring or related to BI Publisher as well as details on the BI Publisher demo booths.  </p>

<p>This year we have: <br />
<ul><br />
	<li>3 OAUG SIG sessions (including the BI Publisher SIG session)</li><br />
	<li>24 General Sessions</li><br />
<blockquote><li>15 sessions featuring BI Publisher</li><br />
	<li>6 sessions on JD Edwards Integration</li><br />
	<li>2 sessions on Siebel Integration</li><br />
	<li>5 sessions covering BI / XML Publisher in E-Business Suite </li><br />
	<li>2 sessions on PeopleSoft Integration</li><br />
</blockquote><br />
	<li>2 Demo Booths (including 1 booth for PeopleSoft - BI Publisher integration)</li><br />
</ul><br />
You will hear directly from customers and partners in many of these sessions. Please drop by the demo booths for a demo and any questions or at least for a nice chitchat.   </p>

<p>Hope to see you there!! <br />
</p>]]></description>
         <link>http://blogs.oracle.com/xmlpublisher/2009/09/focus_on_bi_publisher_-_oracle.html</link>
         <guid>http://blogs.oracle.com/xmlpublisher/2009/09/focus_on_bi_publisher_-_oracle.html</guid>
        
        
         <pubDate>Fri, 25 Sep 2009 16:55:40 -0700</pubDate>
      </item>
      
      <item>
         <title>What are you generating?</title>
         <description><![CDATA[<p>Ever thought, it would be cool to know what your RTF template was going to generate, in terms of output e.g. HTML, PDF, Excel, etc</p>

<p>With the standalone release you can, both the output format  and the template being used are available. Both parameters are available</p>

<p>_xt - template name (not the file name)<br />
_xf - output format</p>

<p>they just need to be declared in your RTF template:</p>

<p>&lt;?param@begin:_xt;''?&gt;<br />
&lt;?param@begin:_xf;''?&gt; </p>

<p>You can then reference the values just like any other parameter in a template.</p>

<p>&lt;?$_xt?&gt;<br />
&lt;?$_xf?&gt;</p>

<p>the format parameter will generate 'html', 'pdf','excel','rtf' ie all lower case.</p>

<p>If you have some specific layout that only needs to be shown if a specific output is generated you can combine the parameter with an if statement:</p>

<p>Short and sweet!</p>

<p>&lt;?if:$_xf='html'?&gt;<br />
 ...<br />
 ...<br />
&lt;?end if?&gt;</p>]]></description>
         <link>http://blogs.oracle.com/xmlpublisher/2009/09/what_are_you_generating.html</link>
         <guid>http://blogs.oracle.com/xmlpublisher/2009/09/what_are_you_generating.html</guid>
        
          <category domain="http://www.sixapart.com/ns/types#category">BI Publisher Enterprise</category>
        
          <category domain="http://www.sixapart.com/ns/types#category">RTF</category>
        
        
         <pubDate>Thu, 24 Sep 2009 10:10:10 -0700</pubDate>
      </item>
      
      <item>
         <title>Multi Database Data Templates</title>
         <description><![CDATA[<p>In my post on <a href="http://blogs.oracle.com/xmlpublisher/2009/09/formatting_concatenated_dataso.html">Formatting Concatenated Datasources</a> I mentioned the better way to do thangs was to use a data template to connect and execute queries on each databases and bring back a grouped/formatted data set.<br />
So rather than the concatenated data set, thus</p>

<pre>&lt;DATA&gt;
&lt;SUPPLIERLIST&gt;
 &lt;G_VENDOR_NAME&gt;
 &lt;G_VENDOR_NAME&gt;
&lt;/SUPPLIERLIST&gt;
&lt;PO_LIST&gt;
 &lt;G_PO&gt;
 &lt;G_PO&gt;
 &lt;G_PO&gt;
 &lt;G_PO&gt;
 &lt;G_PO&gt;
 &lt;G_PO&gt;
&lt;/PO_LIST&gt;
&lt;/DATA&gt;</pre>

<p>we use a data template to generate a hierarchical data set thus:</p>

<pre>&lt;DATA&gt;
 &lt;G_VENDOR&gt;
 &lt;G_PO&gt;
 &lt;G_PO&gt;
 &lt;G_PO&gt;
 &lt;G_VENDOR&gt;
 &lt;G_PO&gt;
 &lt;G_PO&gt;
 &lt;G_PO&gt;
&lt;/DATA&gt;</pre>

<p>Remember, this is executing a query on SQLServer (or other db) to fetch the VENDOR data and executing another 'child' query on Oracle (or another db) to fetch the vendor's PO data.<br />
This will allow you to simplify the layout template removing the need for the variables and the XPATH expression. It will also improve the performance immensely. With the concatenated data sources we were looping over the vendors. Setting a variable for the vendor and then looping over all of the POs filtering out the ones we did not want. So for every vendor we had to loop over every PO - its expensive.<br />
With the data template approach we just following the data structures<br />
<pre><br />
&lt;?for-each:G_VENDOR?&gt;<br />
...<br />
 &lt;?for-each:G_PO?&gt;<br />
 ...<br />
 &lt;?end for-each?&gt;<br />
&lt;?end for-each?&gt;</pre></p>

<p>Much less expensive and simpler too and that satisfies the other mantra for layout templates, KISS!</p>

<p>How do you do it then?<br />
Well first off you need to set up the oracle and SQL Server datasources. In 10.1.3.4 we ship the drivers for you for the popular non-Oracle dbs so setting them up is a relative cinch. We even provide a simple connection string for you to fill out.</p>

<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="MultiDT1.jpg" src="http://blogs.oracle.com/xmlpublisher/images/MultiDT1.jpg" width="574" height="239" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></span></p>

<p>NB: if you are using SQL Server 2008, you can use the 2005 driver. Worked for me.</p>

<p>Once you have both data sources set up its then on to the data template. As I have mentioned previously, there is no 'builder' for data templates in 10.x releases. The world becomes a much nicer place with 11g but you'll have to wait a bit longer for that. If you are just starting out with data templates, check out the <a href="http://blogs.oracle.com/xmlpublisher/2009/06/data_template_progression.html">Data Template Progression</a> entry to get started. Once you are comfortable with the format come back ...</p>

<p>You ready? Its not that tough to do, you just need to get the structure right. I fell in to a trap putting this example together (thanks Ahmed) but I can now share that with you. Here's the DT for the SQLServer (parent) and Oracle (child) queries and their structure.</p>

<pre>&lt;dataTemplate name="DATA" description="SQL Server - Oracle Extraction"&gt;
	&lt;properties&gt;
		&lt;property name="include_parameters" value="true"/&gt;
		&lt;property name="include_null_Element" value="false"/&gt;
		&lt;property name="include_rowsettag" value="false"/&gt;
		&lt;property name="scalable_mode" value="off"/&gt;
		&lt;property name="debug_mode" value="on"/&gt;
	&lt;/properties&gt;
	&lt;dataQuery&gt;
		&lt;sqlStatement name="VENDORS" <strong>dataSourceRef="locsqls"</strong>&gt;&lt;![CDATA[
         select     VENDORS.VENDOR_ID as VENDOR_ID,
     VENDORS.VENDOR_ADDRESS as VENDOR_ADDRESS,
     VENDORS.VENDOR_NAME as VENDOR_NAME
         from     biptest.dbo.VENDORS VENDORS]]&gt;&lt;/sqlStatement&gt;
		&lt;sqlStatement name="POS" <strong>dataSourceRef="lorcl"</strong>&gt;&lt;![CDATA[
           select po.PO_VENDOR as PO_VENDOR,
       po.PO_NUM as PO_NUM,
       po.PO_ITEM as PO_ITEM,
       po.PO_AMT as PO_AMT
           from     PO_TABLE po
       <strong>where po.po_vendor = :VENDOR_ID</strong>]]&gt;&lt;/sqlStatement&gt;
	&lt;/dataQuery&gt;
	&lt;dataStructure&gt;
		&lt;group name="G_VENDOR" source="VENDORS"&gt;
			&lt;element name="VENDOR_ID" value="VENDOR_ID"/&gt;
			&lt;element name="VENDOR_NAME" value="VENDOR_NAME"/&gt;
			&lt;element name="VENDOR_ADDRESS" value="VENDOR_ADDRESS"/&gt;
			&lt;group name="G_PO" source="POS"&gt;
				&lt;element name="PO_NUM" value="PO_NUM"/&gt;
				&lt;element name="PO_ITEM" value="PO_ITEM"/&gt;
				&lt;element name="PO_AMT" value="PO_AMT"/&gt;
			&lt;/group&gt;
		&lt;/group&gt;
	&lt;/dataStructure&gt;
&lt;/dataTemplate&gt;</pre>

<p><br />
I have emboldened the important parts where things deviate from a regular single db data template. Notice the dataSourceRef attributes on the sqlStatement element. These names need to match the ones you defined earlier.<br />
Then the query link, notice Im using a bind variable (:VENDOR_ID). You can not use a link structure i.e.</p>

<pre>&lt;link name="SQLORCL_LINK" parentQuery="VENDORS" parentColumn="VENDOR_ID" childQuery="POS" childColumn="PO_VENDOR" condition="="/&gt;</pre>

<p>they are not supported. Something else of note, I did not hit it here but if you had VENDOR_ID on the SQLServer table and VENDOR_ID on the Oracle table you must ensure they have a different alias e.g. VENDOR_ID and VENDOR_ID1. Although they are on different dbs when it comes to linking them </p>

<pre>where PO.VENDOR_ID = :VENDOR_ID</pre>

<p>will at best confuse the heck out of the extraction engine and get unexpected results. </p>

<p>One other trap that I somehow fell into was to have each query under its own &lt;/dataQuery&gt; element. they need to share one.</p>

<pre>
&lt;dataQuery&gt;
 &lt;sqlStatement name="VENDORS" <strong>dataSourceRef="locsqls"</strong>&gt;&lt;![CDATA[ SQL1 ]]&gt;
 &lt;/sqlStatement&gt;
 &lt;sqlStatement name="POS" <strong>dataSourceRef="lorcl"</strong>&gt;&lt;![CDATA[]]&gt;
 &lt;/sqlStatement&gt;
&lt;/dataQuery&gt;</pre>

<p>Otherwise you get weird table does not exist errors.</p>

<p>Once you have the data template in your report and valid you will get the data set back you want. You can then start adding the parameters, summary columns, etc you want.</p>

<p> &lt;COMBINED&gt;<br />
 &lt;LIST_G_VENDOR&gt;<br />
 &lt;G_VENDOR&gt;<br />
  &lt;VENDOR_ID&gt;1&lt;/VENDOR_ID&gt; <br />
  &lt;VENDOR_NAME&gt;Nuts and Bolts Limited&lt;/VENDOR_NAME&gt; <br />
  &lt;VENDOR_ADDRESS&gt;1 El Camino Real, Redwood City, CA 94065&lt;/VENDOR_ADDRESS&gt; <br />
 &lt;LIST_G_PO&gt;<br />
 &lt;G_PO&gt;<br />
  &lt;PO_NUM&gt;123&lt;/PO_NUM&gt; <br />
  &lt;PO_ITEM&gt;TV&lt;/PO_ITEM&gt; <br />
  &lt;PO_AMT&gt;100&lt;/PO_AMT&gt; <br />
  &lt;/G_PO&gt;<br />
 &lt;G_PO&gt;<br />
  &lt;PO_NUM&gt;124&lt;/PO_NUM&gt; <br />
  &lt;PO_ITEM&gt;Monitor&lt;/PO_ITEM&gt; <br />
  &lt;PO_AMT&gt;300&lt;/PO_AMT&gt; <br />
  &lt;/G_PO&gt;<br />
 &lt;G_PO&gt;<br />
  &lt;PO_NUM&gt;125&lt;/PO_NUM&gt; <br />
  &lt;PO_ITEM&gt;PC&lt;/PO_ITEM&gt; <br />
  &lt;PO_AMT&gt;400&lt;/PO_AMT&gt; <br />
  &lt;/G_PO&gt;<br />
  &lt;/LIST_G_PO&gt;<br />
  &lt;/G_VENDOR&gt;<br />
 &lt;G_VENDOR&gt;<br />
  &lt;VENDOR_ID&gt;2&lt;/VENDOR_ID&gt; <br />
  &lt;VENDOR_NAME&gt;Big Bike Motorsports&lt;/VENDOR_NAME&gt; <br />
  &lt;VENDOR_ADDRESS&gt;10 Downing Street, London, SW1, UK&lt;/VENDOR_ADDRESS&gt; <br />
 &lt;LIST_G_PO&gt;<br />
 &lt;G_PO&gt;<br />
  &lt;PO_NUM&gt;233&lt;/PO_NUM&gt; <br />
  &lt;PO_ITEM&gt;TV&lt;/PO_ITEM&gt; <br />
  &lt;PO_AMT&gt;1000&lt;/PO_AMT&gt; <br />
  &lt;/G_PO&gt;<br />
 &lt;G_PO&gt;<br />
  &lt;PO_NUM&gt;234&lt;/PO_NUM&gt; <br />
  &lt;PO_ITEM&gt;Receiver&lt;/PO_ITEM&gt; <br />
  &lt;PO_AMT&gt;340&lt;/PO_AMT&gt; <br />
  &lt;/G_PO&gt;<br />
 &lt;G_PO&gt;<br />
  &lt;PO_NUM&gt;235&lt;/PO_NUM&gt; <br />
  &lt;PO_ITEM&gt;Phone&lt;/PO_ITEM&gt; <br />
  &lt;PO_AMT&gt;150&lt;/PO_AMT&gt; <br />
  &lt;/G_PO&gt;<br />
  &lt;/LIST_G_PO&gt;<br />
  &lt;/G_VENDOR&gt;<br />
  &lt;/LIST_G_VENDOR&gt;<br />
  &lt;/COMBINED&gt;</p>

<p>Nice!</p>

<p>In terms of performance, its a much better way to get formatted/grouped data in your layout. But as I was discussing with someone this morning. Its a balancing act, you really want the dbs and the extraction engine to do the heavy lifting in terms of nesting structure, summary columns and sorting but you also want to provide the folks who build templates for users as much flexibility as possible. <br />
Its not an exact science by any means, I always try and at least have the data engine extract using a 'sensible' hierarchy. Most if not all users are going to want to list invoices showing header information followed by the lines. Very rarely will they want to turn that hierarchy on its head, so its a good structure to have the DT extract plus the summary columns and sorting that go with it e.g invoice total, sort by line number, etc.</p>

<p>If you want to see the report file, you can get it <span class="mt-enclosure mt-enclosure-file" style="display: inline;"><a href="http://blogs.oracle.com/xmlpublisher/files/Data%20Template%20Multi%20DB.zip">here</a></span>.</p>

<p>Happy Data Templating!<br />
</p>]]></description>
         <link>http://blogs.oracle.com/xmlpublisher/2009/09/multi_database_data_templates.html</link>
         <guid>http://blogs.oracle.com/xmlpublisher/2009/09/multi_database_data_templates.html</guid>
        
          <category domain="http://www.sixapart.com/ns/types#category">BI Publisher Enterprise</category>
        
          <category domain="http://www.sixapart.com/ns/types#category">Data Extraction</category>
        
          <category domain="http://www.sixapart.com/ns/types#category">Data Templates</category>
        
        
          <category domain="http://www.sixapart.com/ns/types#tag">multi database</category>
        
         <pubDate>Mon, 21 Sep 2009 10:10:10 -0700</pubDate>
      </item>
      
      <item>
         <title>Bursting Problems under EBS?</title>
         <description><![CDATA[<p>Are you struggling a bit with getting the bursting control file working under EBS? Maybe you want to add a filter to a delivery channel or you are just lost in the XML structure.</p>

<p><a href="http://bipublisher.blogspot.com">IceMan </a>to the rescue, Ike aka IceMan has built a very slick and extremely useful Bursting Designer. Lots of features to help build the control file.</p>

<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="burstdesigner.jpg" src="http://blogs.oracle.com/xmlpublisher/images/burstdesigner.jpg" width="601" height="431" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></span></p>

<p>Ike has also taken the time to put together user help - check it out on his blog.</p>

<p><a href="http://bipublisher.blogspot.com/2009/09/bi-publisher-bursting-designer.html">http://bipublisher.blogspot.com/2009/09/bi-publisher-bursting-designer.html</a></p>

<p>Download, use and drop Ike a mail or leave a him a comment of thanks.</p>]]></description>
         <link>http://blogs.oracle.com/xmlpublisher/2009/09/bursting_problems_under_ebs.html</link>
         <guid>http://blogs.oracle.com/xmlpublisher/2009/09/bursting_problems_under_ebs.html</guid>
        
          <category domain="http://www.sixapart.com/ns/types#category">Bursting</category>
        
          <category domain="http://www.sixapart.com/ns/types#category">E Business Suite</category>
        
        
         <pubDate>Mon, 21 Sep 2009 08:18:08 -0700</pubDate>
      </item>
      
      <item>
         <title>Formatting Concatenated Datasources</title>
         <description><![CDATA[<p>When you are building reports inside BIP standalone, do you concatenate or data template? If you need to use multiple queries in your report, either in the same database or separate and you need to join that data together in the output, what do you use? Or maybe some other system is spitting out a flattened hierarchy XML.</p>

<p>You have a choice, either use a data template to bring the data together simplifying the template or use the concatenated data source and use some funky tricks in the layout to bring the separate data together.</p>

<p>Let's assume I have vendors in an Oracle db and their purchase orders in a SQL server database. I need to generate a listing report showing vendors and their POs. I have covered data templates elsewhere in this blog and I will follow up with a multi database example next week. Today, lets deal with the concatenated data source. Say I have the following data:</p>

<pre>&lt;DATA&gt;
&lt;SUPPLIERLIST&gt;
 &lt;G_VENDOR_NAME&gt;
  &lt;VENDOR_NAME&gt;Nuts and Bolts Limited&lt;/VENDOR_NAME&gt;
  &lt;ADDRESS&gt;1 El Camino Real, Redwood City, CA 94065&lt;/ADDRESS&gt;
  &lt;VENDOR_ID&gt;1&lt;/VENDOR_ID&gt;		
 &lt;/G_VENDOR_NAME&gt;
 &lt;G_VENDOR_NAME&gt;
  &lt;VENDOR_NAME&gt;Big Bike Motorsports&lt;/VENDOR_NAME&gt;
  &lt;ADDRESS&gt;10 Downing Street, London, SW1, UK&lt;/ADDRESS&gt;
  &lt;VENDOR_ID&gt;2&lt;/VENDOR_ID&gt;		
 &lt;/G_VENDOR_NAME&gt;
&lt;/SUPPLIERLIST&gt;
&lt;PO_LIST&gt;
 &lt;G_PO&gt;
  &lt;PO_VENDOR&gt;1&lt;/PO_VENDOR&gt;
  &lt;PO_NUM&gt;123&lt;/PO_NUM&gt;
  &lt;PO_ITEM&gt;TV&lt;/PO_ITEM&gt;
  &lt;PO_AMT&gt;100&lt;/PO_AMT&gt;
 &lt;/G_PO&gt;
 &lt;G_PO&gt;
  &lt;PO_VENDOR&gt;1&lt;/PO_VENDOR&gt;
  &lt;PO_NUM&gt;124&lt;/PO_NUM&gt;
  &lt;PO_ITEM&gt;Monitor&lt;/PO_ITEM&gt;
  &lt;PO_AMT&gt;300&lt;/PO_AMT&gt;
  &lt;/G_PO&gt;
 &lt;G_PO&gt;
  &lt;PO_VENDOR&gt;1&lt;/PO_VENDOR&gt;
  &lt;PO_NUM&gt;125&lt;/PO_NUM&gt;
  &lt;PO_ITEM&gt;PC&lt;/PO_ITEM&gt;
  &lt;PO_AMT&gt;400&lt;/PO_AMT&gt;
 &lt;/G_PO&gt;
 &lt;G_PO&gt;
  &lt;PO_VENDOR&gt;2&lt;/PO_VENDOR&gt;
  &lt;PO_NUM&gt;233&lt;/PO_NUM&gt;
  &lt;PO_ITEM&gt;TV&lt;/PO_ITEM&gt;
  &lt;PO_AMT&gt;1000&lt;/PO_AMT&gt;
 &lt;/G_PO&gt;
 &lt;G_PO&gt;
  &lt;PO_VENDOR&gt;2&lt;/PO_VENDOR&gt;
  &lt;PO_NUM&gt;234&lt;/PO_NUM&gt;
  &lt;PO_ITEM&gt;Receiver&lt;/PO_ITEM&gt;
  &lt;PO_AMT&gt;340&lt;/PO_AMT&gt;
 &lt;/G_PO&gt;
 &lt;G_PO&gt;
  &lt;PO_VENDOR&gt;2&lt;/PO_VENDOR&gt;
  &lt;PO_NUM&gt;235&lt;/PO_NUM&gt;
  &lt;PO_ITEM&gt;Phone&lt;/PO_ITEM&gt;
  &lt;PO_AMT&gt;150&lt;/PO_AMT&gt;
 &lt;/G_PO&gt;
&lt;/PO_LIST&gt;
&lt;/DATA&gt;</pre>

<p>You'll notice both the vendors and the PO are at the same level in the XML hierarchy. Looks tough to bring them together in the output to get</p>

<p>VENDOR1<br />
 PO1<br />
 PO2<br />
VENDOR2<br />
 PO1<br />
 PO2.</p>

<p>With a very simple template approach we get</p>

<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="ConcatDS1.jpg" src="http://blogs.oracle.com/xmlpublisher/images/ConcatDS1.jpg" width="600" height="400" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></span></p>

<p>Not what you need right?</p>

<p>Looking back at the data, you might also have noticed that both the vendor and PO share the vendor ID - we can use that. In our RTF template we are going to loop over the vendors and inside loop over the PO but checking vendor ID to ensure we are getting the right POs.</p>

<p>There are two pieces to the solution that are different to a regular template loop over or re-grouping over a regular hierarchical or completely flat data set.</p>

<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="ConcatDS3.jpg" src="http://blogs.oracle.com/xmlpublisher/images/ConcatDS3.jpg" width="601" height="283" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></span></p>

<p><br />
Variable - as we loop over the vendors we need some way of tracking what vendor record we are currently processing. In my template just after the for-each for the G_VENDOR group I have field with<br />
<pre>&lt;?variable@incontext:v_id;VENDOR_ID?&lt;</pre></p>

<p>Its not really a variable, you can not update with a value, you can just reference it or re-declare it. Im using the @incontext command to keep the variable localized to the vendor loop.</p>

<p>The other piece of interest is the loop command for the POs.</p>

<pre>&lt&?for-each:/DATA/PO_LIST/G_PO[PO_VENDOR= $v_id]?&gt</pre>

<p>Two things of note in here:<br />
<OL><LI>The for-each is not using 'G_PO' as you might expect. Im providing the complete path to the PO group. Why? Because Im currently looping over the vendors in an outer loop. Remember POs are at the same level as the vendors so &lt;?for-each:G_PO?&gt; will not find any data.</LI><br />
<LI>There is an XPATH expression associated with the for-each, '[PO_VENDOR= $v_id]' - this is instructing the rendering engine to only show PO records that have a vendor id equal to the parameter, 'v_id' - remember that was set and re-set every time you hit a new vendor in that loop.</LI></OL></p>

<p>That's it, those two pieces of 'code' allow you to generate a hierarchical output from the concatenated data set.</p>

<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="ConcatDS2.jpg" src="http://blogs.oracle.com/xmlpublisher/images/ConcatDS2.jpg" width="600" height="400" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></span></p>

<p><br />
If you need the template and some data, get em <span class="mt-enclosure mt-enclosure-file" style="display: inline;"><a href="http://blogs.oracle.com/xmlpublisher/files/ConcatData.zip">here</a></span>.</p>

<p>Yep, its a simple demo but you get the idea. Of the two options, layout or data template - Id go with the data template every time. Get the extraction engine to do the heavy lifting and KISS on the layout template :0) Complex layout templates mean scared business users that will not touch the template even if it is in friendly ol' MSWord. Im excluding version 2007 from that term of endearment, I have had it 6 months and I still don't like it!</p>

<p>Enjoy yer weekend, after my week, I'll be sleeping!<br />
</p>]]></description>
         <link>http://blogs.oracle.com/xmlpublisher/2009/09/formatting_concatenated_dataso.html</link>
         <guid>http://blogs.oracle.com/xmlpublisher/2009/09/formatting_concatenated_dataso.html</guid>
        
          <category domain="http://www.sixapart.com/ns/types#category">Data Extraction</category>
        
          <category domain="http://www.sixapart.com/ns/types#category">RTF</category>
        
          <category domain="http://www.sixapart.com/ns/types#category">XSL/XPATH</category>
        
        
         <pubDate>Fri, 18 Sep 2009 11:13:24 -0700</pubDate>
      </item>
      
   </channel>
</rss>
