Categories
- All Categories
- 15 Oracle Analytics Sharing Center
- 15 Oracle Analytics Lounge
- 208 Oracle Analytics News
- 41 Oracle Analytics Videos
- 15.7K Oracle Analytics Forums
- 6.1K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 76 Oracle Analytics Trainings
- 14 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
BI Publisher for MS Word - if else condition for paragraph

Summary
BI Publisher for MS Word - if else condition for paragraph
Content
Working on a report where I would use a if else conditions for certain data and XML fields to appear/disappear. I have looked into XSL, XDO and FO functions but I keep running into fundamental errors among them. Essentially, I'm looking for functions to handle a paragraph with a header, text and XML elements to appear if condition is met and not appear at all if condition is not met.
Ex.
If A.PLAN_TYPE = 1
output:
COVERAGE
Your plan type XMLfield 1 expires on XMLfield2
and
else A.PLAN_TYPE != 1
output:
(blank)
I have tried multiple ways of doing this and have struggled getting the underline to appear, tried doing it with xsl but no luck. If there is any resources out there that would be helpful as well.
Answers
-
If you have lots of plan types that you need to manage. It might be better to break them all out into a separate document and call them dynamically to be pulled in.
Blog post I wrote a while ago here: https://blogs.oracle.com/xmlpublisher/conditional-templates
If it is only a few types then you might need to investigate the @inline feature. So your if statement would become
<?if@inline: A.PLAN_TYPE = 1?>
output:
COVERAGE
Your plan type XMLfield 1 expires on XMLfield2
<?end if?>
<if@inline: A.PLAN_TYPE !=1?>
abc
def
<?end if?>
I know its repetitive with the ifs but XSL does not do ELSEs very well. You could also use a choose statement.
Cheers
Tim
0 -
share your template and xml , will help you out. Thanks
0