Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
Am able to format a division of the first part of this expression to two decimal places(below), however am unable able to format it after a multiplication by 100. i want to format to one decimal place the result of multiplication
 
=formatnumber((SUM(IIf(Fields!Gender.Value = "F",Fields!Eligibleteachers.Value,0)))/SUM(IIf(Fields!Gender.Value = "F",Fields!CountTeachers.Value,0)),2)*100
 
thanks
Posted 5-Feb-13 3:12am
mayeso641

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Multiply by 100 before taking on the precision.

Try:
=formatnumber(100*(SUM(IIf(Fields!Gender.Value = "F",Fields!Eligibleteachers.Value,0)))/(SUM(IIf(Fields!Gender.Value = "F",Fields!CountTeachers.Value,0))),1)
  Permalink  
v2
Comments
mayeso at 5-Feb-13 13:25pm
   
Thanks Sandeep it worked, great. I also find a way to get what i wanted. I just needed a 3 decimal places,if this is multiplied by 100 it will displace two decimals hence i will have 1 decimal place
Sandeep Mewara at 6-Feb-13 0:15am
   
Welcome.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web03 | 2.8.141022.2 | Last Updated 5 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100