BI Publisher (MOSC)

MOSC Banner

Calling sub-template with parameter

edited Jun 28, 2016 10:24AM in BI Publisher (MOSC) 2 commentsAnswered ✓

Hello,

I am trying to conditionally print a logo in a subtemplate by passing a data element from the sample xml to the sub template as follows:

I defined a sub-template as follows:

<?template:LOGO?><?param:p_logo;string('NA')?>

<?choose:?>

  <?when:$p_logo=’March’?>

Some Logo

<?end when?>

<?when:$p_logo=’January’?>

Some Other Logo

<?end when?>

<?otherwise:?>

Otherwise logo

<?end otherwise?>

<?end choose?>

<?end template?>

Then I call this template LOGO as follows:

<?call@inlines:LOGO?>with-param:p_logo;MONTH?><?end call?>


Here MONTH is the data element in the sample xml.


What I find is that not matter what value is passed in MONTH, the sub template always prints the "Otherwise logo". What am i doing wrong? I am attaching the RTF template with sample data.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center