To reference a parent level element in a child level table, you can use the “../” notation.
For example , if you have a block Department and a child block as Employee
<?xml version=”1.0″ encoding=”UTF-8″?>
<!– Generated by Oracle Reports version 10.1.2.3.0 –>
<MPLDEPRICIATION>
<LIST_G_DEPT>
<G_DEPT>
<DEPT_NAME>Oracle</DEPT_NAME>
<LIST_G_EMP>
<G_EMP>
<EMP_NAME>Arun</EMP_NAME>
<ENO>1234</ENO>
</G_EMP>
<!– Generated by Oracle Reports version 10.1.2.3.0 –>
<MPLDEPRICIATION>
<LIST_G_DEPT>
<G_DEPT>
<DEPT_NAME>Oracle</DEPT_NAME>
<LIST_G_EMP>
<G_EMP>
<EMP_NAME>Arun</EMP_NAME>
<ENO>1234</ENO>
</G_EMP>
</LIST_G_EMP>
</G_DEPT>
</LIST_G_DEPT>
</MPLDEPRICIATION>
Now to reference the value of DEPT_NAME in G_EMP group , we can use the following
<?../DEPT_NAME?>
You can always use the absolute path to reference any extract element anywhere in the
template. The absolute path starts with a backslash “/”.
This notation goes up to any level for the parent elements.
For example the absolute path for the above example would be /G_DEPT/DEPT_NAME
The absolute path syntax provides better performance.
If we have 3 levels of hierarchy then we can use <?../../DEPT_NAME?>
No comments:
Post a Comment