| 
 Posted by Andy on 10/29/06 18:07 
Hi Rick, 
 
you are using integers and in integer division 3/2 is 1. 
Use floats or cast your numbers to floats in the calculation: 
 
float result=((float)Count(RecordID))/((float)NoOfClients); 
 
Regards, 
Andy 
 
Rico schrieb: 
> Hi Folks! 
>  
> I have a strange thing happening; I have a field that Counts the number of  
> records and another field that shows the number of clients  
> (Count(RecordID)=3 and NoOfClients=2)  When I do a simple expression  
> "Count(RecordID)/NoOfClients" the expected result should be 1.5.  Instead  
> the result I get is 1.  Any ideas? 
>  
> Thanks! 
> Rick
 
  
Navigation:
[Reply to this message] 
 |