Sunday 26 April 2020

How to hide a row based on condition in rtf templates

How to hide a row based on condition in rtf templates

In this post , We will be discuss about how to hide a row based on condition in rtf templates. We will try to hide a row in the rtf template using the 'if 'condition. We have the rtf features like 'if' condition with the help of this , we can hide a row based on condition in rtf templates. We just need to use the 'if' condition in the right place to conditionally display the rows in the rtf templates. This helps to display the column and rows based on condition in rtf templates. Using if else in rtf template we can can dynamically control the layout and rows of the rtf templates. If else helps to meet the conditional business layout requirements in rtf template. Here below we will be discuss in more about how to hide a row based on condition in rtf templates.
How to hide a row based on condition in rtf templates
How to hide a row based on condition in rtf templates


2 Methods to hide a row based on condition in rtf templates

1st Method: 

<?IF?>

<?END IF?>

2nd Method: 

<?xdofx:if element_condition then result1 else result2 end if?>


Working Example to hide a row based on condition in rtf templates

Here in the below Example , P_FLAG is the XML attribute. Whose value is changing as per the report output.

IFDiscount
0.00ENDIF

Here we can trying to put condition if _FLAG='Y' then 'Discount' will print , otherwise This above row will be hide.

Under IF , we have written this below script '<?if:P_FLAG='Y'?> ' and in ENDIF We have put '<?end if?>'

We need to end the If condition using '<?end if?>' script.

<?if:P_FLAG='Y'?>Discount
0.00<?end if?>


How to hide a row based on condition in rtf templates
How to hide a row based on condition in rtf templates

0 comments:

Post a Comment

Contact us for any Collaboration, Project Support & On Job Support Work

Name

Email *

Message *