The following example demonstrates how to
conditionally highlight a cell based on a value in the XML file.
In this we are going to use same RTF
and RDF which we had used in IF
STATEMENT which is shown below
Our RDF: -
Our RTF: -
Now we are going to place two form
fields as CH1 AND CH2 in Inv_Amt and
in Appr Amt respectively as shown
below
Default Text Entry
|
Form
Field Entry
|
Description
|
CH1
|
<?if:INVOICE_AMOUNT>5000?>
<xsl:attribute
xdofo:ctx="block" name="background-color"> red</xsl:attribute>
<?end
if?>
|
This
field holds the code to highlight the cell red if the debit amount is greater
than 5000.
|
CH2
|
<?if:
approved_amount
>5000?>
<xsl:attribute
xdofo:ctx="block" name="background-color">green</xsl:attribute>
<?end
if?>
|
This
field holds the code to highlight the cell red if the credit amount is
greater than 5000.
|
Save the RTF
Now we have to publish the report
Click on Template Builder => Preview =>
HTML/PDF/Excel/RTF (any format).
We can get below output
No comments:
Post a Comment