An Oracle blog about BI Publisher

Dastardly Dynamic Data Dilemma

Another great cartoon from the past ... so to something a little more useful. A nice real world problem from a custmer today. Say you needed an output that showed a chart and a table beneath it ... you had no idea how much data was going to hit your report at runtime but you wanted an output looking something like this.


Notice the chart has no column labels or legend, you would add this to the table rows, the idea is that the table columns line up with the chart columns and data points. Pretty nifty eh? It can be done with publisher relatively easily using its support for dynamic data. It requires a little 'alignment' to get table columns lined up with chart columns but thats just a little jiggery pokery.

Whats going on in the template then?

Well the chart is pretty standard we have covered multiple y-axis entries in previous entries.  So the only tough bit we have is the table. In the first column we have fixed row headers, we could handle dynamic data here if we wanted. To get the second column to handle the dynamic data we set its width to that required, in this case the width of the plot are of the chart, just use your mouse to drag the table border. Notice the red arrows in the following image marking the table column alignment.


It might take a little adjustment to get things aligned exactly but its only a few iterations with the template builder.

In the fields we are using, for Time


The split-column-header just tells the rendering engine to split the available space qually between the number of ocuurences of the G_MEASUREMENT group, then the FINISH_DATE is inserted.

The next rows handle the specific data elements:


They work just the same way. The whole split column functions can be a little more sophisticated if needed. In this case we wanted equal columns across a given width, we could also specify widths for each column either as a percentage of the total width. Just note the limiting factor to the number of columns shown in the table is going to be how small you can make that font and still make it readable for your users and I guess how messy that chart is going ot get.

The other case we did not need to handle here but publisher is up to it, is something along the lines of the 'Z' printing format in Excel. Let's assume we had a report with 50 columns in it, ordinarily publisher would reach the edge of the page and truncate the report. With the dynamic column support we can generate reports to say PDF that behave like Excel when it prints i.e. print columns across the page until we can not fit anymore, drop to the next page and continue, repeating the row header if we wish, we continue like that until the columns are exhausted. If we had too many rows on a page then we would start at column 1 and go through again until all the rows had been rendered to the page.

This technique is pretty well covered in the user guide and the Template Builder install provides another example showing how to specify the width. You can get the sample RTF, XML and output here

Join the discussion

Comments ( 13 )
  • Maryjo Neudeck Saturday, March 20, 2010
    Haha. I am happy Britney is back in business and i cannot wait to see her live. Do you think she is getting married again?
  • Cheapest cheap california auto insurance Thursday, June 3, 2010
    Good Job, cheap california auto insurance [url=http://www.purevolume.com/listeners/CHEAPCALIFORNIAAUTOINSURANCE#1]cheap california auto insurance[/url], ewu,
  • bikini wallpapers Thursday, June 3, 2010
    So where it to find?, bikini wallpapers, [url= http://www.scam.com/member.php?u=154247 ]bikini wallpapers[/url], 4373,
  • celebrity sex tapes Saturday, June 5, 2010
    Your Site Is Great, celebrity sex tapes online [url=http://www.thisis50.com/profiles/blogs/celebrity-sex-tapes#1]celebrity sex tapes online[/url], 8-DDD,
  • cheap wow gold Monday, August 2, 2010
    That's great.very helpful,thanks a lot
  • Affordable Auto Insurance Wednesday, August 18, 2010
    Thank you for a great post
  • Kate Wednesday, August 25, 2010
    Hiya! =) Just came across this from a Yahoo search. God it took forever. FINALLY I've located the correct site. It's so irritating when you do a search, then have to go through like.. 50 pages before you find a site with what you're trying to find. Damn. Oh! Sorry for going off topic hahah. Just figured I'd give a quick thanks while I'm here. I didn't mean to whine on like that. xP Happens from time to time ahhaha
  • Ira Bogenschneide Monday, August 30, 2010
    What a writeup!! Very informative and also easy to understand. Looking for more such blogposts!! Do you have a twitter or a facebook?
    I recommended it on stumbleupon. The only thing that it's missing is a bit of color. Nevertheless thank you for this information.
  • Dorsey Appiah Thursday, September 23, 2010
    I dislike fashion,I dislike anything regarding it and as a consequence all relevant parties within it; I don't really like the field, the ballyhoo, the smell and the feel of it,Specifically, I dispise the a lot of in any other case sentient individuals who will be suckered in it
  • Ilona Toye Sunday, September 26, 2010
    Today, Rush played out movies of The president and Hillary Clingon and also other Dems followed by played clips from Ahmadinejad’s presentation and remarked that they mutually say the same things when debating The states and capitalism.
  • Boris Levy Sunday, October 10, 2010
    You need to read about online marketing techniques. Aside from being an easier alternative to traditional advertising, online marketing is an intensely powerful method to connect to the consumers, millions of them, and turn them to sales.
  • Charlyn Adelstein Monday, October 11, 2010
    Whereas fun to look at, still a touch sad. I do not think that Britney can ever really get her act together.
  • mercury insurance Sunday, October 24, 2010
    Very interesting post thanks for writing it I just added your website to my favorites and will be back. www.flipxinsure.com
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.