Page 1 of 1

How to use Cell_Rendered server event for report?

Posted: Wed Jan 25, 2023 8:14 am
by christ2000

Hello i am using the following code to show the values of 2 fields, just in one

function Cell_Rendered(&$Field, $CurrentValue, &$ViewValue, &$ViewAttrs, &$CellAttrs, &$HrefValue, &$LinkAttrs)
{
    $EX=$this->ExpirationDate->ViewValue;
    $dr=$this->DaysRemaining->CurrentValue;
   $this->ExpirationDate->ViewValue= "$EX $dr";
}

the problem is the variable that show DaysRemaining repeat the values on the field 5 times, so look like:

1/27/2023 3 Day(s) Remaining 3 Day(s) Remaining 3 Day(s) Remaining 3 Day(s) Remaining 3 Day(s) Remaining

is my code correct, or there is a better option?

thanks


Re: Code on report problem

Posted: Wed Jan 25, 2023 9:12 am
by mobhar

You should refer to code example of Cell_Rendered server event.