kirchaj
Posts: 215
|
| Posted: 09/28/2009, 11:49 AM |
|
I have a fairly simple report that lists scores and then gives an average for each group and an average for all of the groups. I have added an image label with custom code in the before show event to display one image if the group average is above 2.5 and a different one if below 2.5. This works great for body of the report. When I use similar code to display the image in the footer area, the code does not display the correct images.
I have doubled and triple checked the code and I believe it is OK. When I tried echoing the total average, it did not display correctly. So I think I am not retrieving the total average in the correct way. Can anyone shed any light on the way to get the total average (value from that label) which is located in the footer area?
Thanks for any ideas.
TK
|
 |
 |
kirchaj
Posts: 215
|
| Posted: 09/30/2009, 1:17 PM |
|
Ok, here is what I found. By default, all averages in a report are set to integer. At least averages of integer fields are set this way. When you do a GetValue on the average, PHP or CCS rounds the number. When I set the average labels to float, the GetValue produced the correct answer.
Can't tell you why averages are being set to integers, but it was easy to fix.
TK
|
 |
 |
|