Tuesday 21 April 2020

How to hide a column based on condition in rtf Templates

How to hide a column based on condition in rtf Templates

In this post , We will be discuss about how to hide a column based on condition in rtf templates. We will try to hide the column in the rtf template using the 'if 'condition. We have the rtf feature like if condition with the help of this , we can hide an column based on condition in rtf templates. We just need to use the 'if' condition in the right place to conditionally display the column in the rtf templates. This helps to display the column based on condition in rtf templates. Using if else in rtf template we can can dynamically control the layout 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 column based on condition in rtf Templates.

How to hide a column based on condition in rtf Templates


2 Options to hide a column based on condition in rtf Templates

1st Method: 

<?IF?>

<?END IF?>

2nd Method: 

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



Example using if else in rtf template

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

Here we can trying to put condition if _FLAG='Y' then 'Yes' will print , otherwise 'No' will be print.

 <?if:P_FLAG='Y'?> Yes <?end if?><?if:P_FLAG='N'?> No <?end if?>

<?xdofx:if PO_AMOUNT > 1000 then 'Apprvoal Required'
else
if INVOICE_AMOUNT <1000 then 'Apprvoal Not Required'
end if?>

How to hide a column 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 *