Conditional
formatting in XML publisher can be handled by If and while statements
- If Statement
- <?if:COLOR='RED'?>Y<?end if?>
- If-then-Else
- <?if:COLOR='RED' then Y else N end if?>
- Nested
If-then-Else
<?if:COLOR='RED' then Y else if COLOR = 'BLUE' then B else N end if?>
Combining
If with <?xdofx:expression?> helps in scripting SQL statements.
Refer below.
- Choose
- <?choose:?>
<?when:expression?>
<?otherwise?> - Example
<?choose:?>
<?when:CLOLOR = ‘RED'?>
'Y'
<?end when?>
<?when:COLOR = 'B'?>
'B'
<?otherwise?>
'N'
<?end otherwise?>
<?end choose?>
BI Publisher has extended
a set of SQL and XSL functions for use in RTF templates. The syntax for these
extended functions is
<?xdofx:expression?>
--> for extended SQL functions or
<?xdoxslt:expression?>
--> for extended XSL functions
- <?xdofx:if COLOR ='Y' then substr('ACCEPTED',1,6) else REJECT end if?>
Refer --> Exteneded Functions
Can you help me figure out the syntax to use? I've done a lot of web searching and tried probably 30 iterations of this to try to make it work, all to no avail. All I want to do is print a field in red if another field has one value, or print the same field in regular text if the other field has a different value.
ReplyDeleteCUM_GPA else CUM_GPA end if?>
Thanks much!
Hm, lost part of the content...
ReplyDeleteCUM_GPA else CUM_GPA end if?>
Thanks much!
One more time...
ReplyDelete<?xdofx:if GPA_STATUS = 'F' then <fo:inline color="red"> CUM_GPA </fo:inline> else CUM_GPA end if?>
Hey,
ReplyDeletePlease tell me any solution of this...
"< ? if:SEX='F' then APPLY_CNT end if ? >"
its not working.