O
|
osluk author 6/28/2006 |
Hi I have the percentages working great now see the screengrabs below.
|
![]() |
Alexey admin 6/28/2006 |
Chris, else if($format == FORMAT_PERCENT) $ret = ($data[$field]*100)."%";
else if($format == FORMAT_PERCENT) $ret = round($data[$field]*100)."%"; |
O
|
osluk author 6/28/2006 |
Might to cool to add the choice of the decimal places to the wish list.
|
![]() |
Alexey admin 6/29/2006 |
Chris. else if($format == FORMAT_PERCENT) { if($data[$field]) $ret = round($data[$field]*100,2)."%"; else echo "N/A": } |
O
|
osluk author 6/29/2006 |
That is almost perfect thanks Alexa. |
O
|
osluk author 6/29/2006 |
Chris. here is the code to show two decimal places if percentage is calculated and "N/A" otherwise. I could be wrong but when I got the following error message Parse error: syntax error, unexpected ':', expecting ',' or ';' in /hsphere/local/home/bauduc-dev/bordeauxreport.com/db-2005/AdminD/include/data_functions.php on line 742 I tried changing the : to a ; and now it works great.
|