Friday, 17 May 2024

Calling of subtemplate from Main template in BI Publisher in Oracle Fusion

 Sometimes there are requirement where header and footer are changing and rest content/body of template is same.

For example there are multiple addresses for any parent company.

In that case we can create subtemplate and call that subtemplate in parent template.

Creating Subtemplate:

In RTF template , do below

<?template:MyAddressUS?>
My Company
500 Main Street
Any City, CA 98765
<?end template?>                                                                    
?template:MyAddressIndia?>
My Company
500 Main Street
India
<?end template?>    
Now we can save that template in fusion, Go to oracle fusion

its extension will be .xsb

Now we need to call that template in our main template,
wherever we want to call in the main template

Calling of Subtemplate from Main template:
In the Main template enter the following import statements in the form field or directly
anywhere in the template.

  1. <?import:xdoxsl:///Customer Reports/Templates/Sub_Template_Address_XXX.xsb?>
    
  2. In Main template where you want to show that address, use below Call command
  3. <?call-template:MyAddressUS?>
  4. At runtime, parent template will take care of those path.
  5. To handle parameterized layout , use below command
  6. In the RTF template define a parameter using syntax - 

<?param@begin:ParameterName?>

For example:

<?param@begin:DeptName?>


Happy Learning .







No comments:

Post a Comment