Monday, October 22, 2007

BI Publisher: Bursting - How to resolve pruning issues

Andrew Papastefanou for South Africa wrote:


When bursting according to a specific location in my data, I find that I
cannot access fields outside the scope of the 'select' in the control file.

I have the following xml file:

My select request in my control
file tries to burst according to branches as follows:


My report template however, needs to be able to display "CNAME" which is a node in the /DATA/CONTROL_AREAS/CONTROL_AREA section of data. Opening the generated report shows a blank space where the field 'CNAME' should be.

Is this information available when I use a 'select'
to somewhere inside the tree?
Or do I need to create a new template each
time to display the outer data?

I tried many XPATH combinations but was
unable to get that to work either.

Thanks in advance!

The two selects Andy was doing were as follows and in this order:

The reason CNAME was not showing up in the xml was because it was pruned (removed) from the previous red select...There were a couple of responses on how to solve the issue. CJ (Chris Brown in the BI Publisher Forum) Suggested to add the CONTROL_AREA deeper in the xml at the same level with BRANCH. Not a bad idea, but there is a an easier way to solve this issue.

This alternative solution I came up with was to just switch the order like so:


Now the only thing that will have gotten pruned will be everything from BRANCH. There is another solution for this issue as well.

Create two burst files and call the DocumentProcessor API in a java concurrent program. However, this solution could be considered excessive compared to previous mentioned ones.
Sample Call: DocumentProcessor dp = new DocumentProcessor(getBurstDirectory() + getBurstFileName(), getOutputDirectory() + getOutputFile() + ".xml", getOutputDirectory());

Now when you run into this issue, you can keep your cool and remeber that prunes are for old people.



Lavina said...

Hi Ike,

I have been trying to use the above solution with the email delivery channel.I have a similar issue with pruning and moving fields around is not an option.The emailed pdf does not display the fields inspite of adding a second burst select to the bursting control file.Was wondering if you could shed some light on this.

Lavina Fernandes

Ike Wiggins said...

Lavina it's about the order of execution for bursting. If you set it up right pruning shouldn't be an issue. You may need to do some elaborate xpath to get it to work in your situation depending on the complexity....

Amit said...

I have a select on /data/project_manager
xml data has three project_manager A, B and C.
When I burst it and deliver it using email i receive emails with subject refering to the project_manager from the data following the one that is sent as attachment i.e. I get email subject as "Invoice for B' with attachment of A, "Invoice for C' with attachment of 'B' and "invoice for C" with attachment of 'C'.

Ask and Ye Shall Receive said...

I am Anupam and I have a query regarding BI Publisher.

My question is : Is it possible to use multiple data models and burst the entire report(which includes data from other data models) by a parameter present in all the data models?

Example : Datamodel1: Deptno
metric 1
metric 2...

Datamodel2: Dept no
metric 1
metric 2...

Now I wish to build a report consisting of data from both the data models and burst reports based on Dept no.

When I try to do this , it shows me data for only one Dept no and that too for just one datamodel. The data for the second data model isn't visible.

Is there a way to make the two datamodels to work together so that they treat both the Dept nos as same.

Ike Wiggins said...

The answer to this question is yes and no. It's tricky to say the least. What you will need to do is use the BAR xpath syntax | and union the xpath queries together. You will need to also do this in your format template.

An alternative to this approach would be to do an actual union in your data template. This would eliminate the extra data model and make your life a lot easier!

Make Sense?

Ike Wiggins

Kris said...

Hi Ike,
Glad I found your blog. I seem to have a similar issue like the one described here. I need to show data that is pruned. It seems this is possible with your tool or by switching the selects.
I did look up more information about bursting control files but did not find how it works. I use bip, I see no possibility to work with control files. I described my issue in the oracle forum :

Probably I miss something very simple. I was hoping you could point me in the right direction.