Hi,
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:
DATA
_CONTROL_AREAS
__CONTROL_AREA
___CNAME
___BRANCHES
____BRANCH
_____DIVISIONS
______DIVISION
_______AGENTS
________AGENT
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:
request select="/DATA/CONTROL_AREAS/CONTROL_AREA"
request select="/DATA/CONTROL_AREAS/CONTROL_AREA/BRANCHES/BRANCH"
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:
request select="/DATA/CONTROL_AREAS/CONTROL_AREA/BRANCHES/BRANCH"
request select="/DATA/CONTROL_AREAS/CONTROL_AREA"
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.
Ike