To reference a parent level element in a child level table — BI Publisher

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>

</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?>

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s