blasalle
Posts: 69
|
| Posted: 06/23/2009, 7:39 AM |
|
I want to add a column to a report a calculate a value based on two other columns. I have crated the a temporary calculated value (cal_ienfd) as a Before Show event. How do I assign this to the new column text box ienfd?
I got some help from Yessoftware and the solution was:
$Container->ienfd->SetValue($cal_ienfd);
here is all of the code for anyone with a similar problem:
global $CCSLocales;
$f_count = $Container->fiber_count->GetValue();
$e_length = $Container->epidermal_length->GetValue();
if (0 != $e_length) {
$cal_ienfd = $f_count/$e_length;
$cal_ienfd = number_format($cal_ienfd, 2, '.', '');
$Container->ienfd->SetValue($cal_ienfd);
}
bernie
_________________
Bernie
University of Utah
Salt Lake City, UT USA |
 |
 |
datadoit
|
| Posted: 06/23/2009, 3:29 PM |
|
If you're in the report's BeforeShow event and getting your temporary
calculated value, then assign that value to your column control:
$Container->NewColumnTextBox->SetValue($cal_ienfd);
|
|
|
 |
blasalle
Posts: 69
|
| Posted: 06/23/2009, 3:34 PM |
|
Thanks - I'll incorporate this into the code.
bernie
_________________
Bernie
University of Utah
Salt Lake City, UT USA |
 |
 |
|