Rounding to the nearest $100

Stimulsoft Reports.NET discussion
Post Reply
Crystole Roberts
Posts: 18
Joined: Thu Aug 27, 2009 2:54 pm
Location: Louisville, KY

Rounding to the nearest $100

Post by Crystole Roberts »

Hello,

I am using an older version of the your product, 2010.2.745.0 to be exact (and, anxiously waiting for a drop of the newest release!), and am trying to round a number to the nearest $100. It seems that I am able to round to specific decimal places, but am unable to round to the left of the decimal. Can you please advise?

Thank you,

Crystole Roberts
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Rounding to the nearest $100

Post by Alex K. »

Hello,

Please try to use the following expression:
{Math.Round(YourValue/100) * 100}

Thank you.
Crystole Roberts
Posts: 18
Joined: Thu Aug 27, 2009 2:54 pm
Location: Louisville, KY

Rounding to the nearest $100

Post by Crystole Roberts »

Thank you! That did the trick!
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Rounding to the nearest $100

Post by Andrew »

Hello,

Great!

Have a nice day.
Thank you.
davidnamer
Posts: 2
Joined: Mon Oct 29, 2012 5:39 am

Re: Rounding to the nearest $100

Post by davidnamer »

hi
i use this
but it gives error
" The call is ambiguous between the following methods or properties: 'System.Math.Round(double)' and 'System.Math.Round(decimal)' "
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Rounding to the nearest $100

Post by HighAley »

Hello.

You should cast type to Double or Decimal.

Thank you.
Post Reply