Click here to Skip to main content
12,694,842 members (33,171 online)
Rate this:
Please Sign up or sign in to vote.
See more: VB 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

Posted 5-Feb-13 4:12am

1 solution

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

Solution 1

Multiply by 100 before taking on the precision.

=formatnumber(100*(SUM(IIf(Fields!Gender.Value = "F",Fields!Eligibleteachers.Value,0)))/(SUM(IIf(Fields!Gender.Value = "F",Fields!CountTeachers.Value,0))),1)
mayeso 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 6-Feb-13 0:15am

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170118.1 | Last Updated 5 Feb 2013
Copyright © CodeProject, 1999-2017
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