SSRS Numbers Removing Decimal and keeping trailing numbers - ssrs-2008

I have a Report Using SSRS BIDS 2008 R2. I am looking for a method of converting my number by simply removing the decimal. I want to keep the numbers after the decimal just remove the '.'
The Goal:
Format a number (currently a currency) into a string but keep the trailing numbers.
i.e.
Current Value 30.56
Desired Value 3056
I have found numerous ways to remove the decimal but they all end up either rounding my number or removing the numbers after the Decimal point. I was wondering if it was possible to keep the numbers after the decimal place, but have no decimal.
I feel like I am missing something important here and will more than likely feel a little silly once it is pointed out.
Thanks in advance.

Just convert the number to a string and replace the .:
=Replace(Fields!MyColumn.Value.ToString, ".", "")

Related

Why NumberLong(9007199254740993) matches NumberLong(9007199254740992) in MongoDB from mongo shell?

This situation happens when the given number is big enough (greater than 9007199254740992), along with more tests, I even found many adjacent numbers could match a single number.
Not only NumberLong(9007199254740996) would match NumberLong("9007199254740996"), but also NumberLong(9007199254740995) and NumberLong(9007199254740997).
When I want to act upon a record using its number, I could actually use three different adjacent numbers to get back the same record.
The accepted answer from here makes sense, I quote the most relevant part below:
Caveat: Don't try to invoke the constructor with a too large number, i.e. don't try db.foo.insert({"t" : NumberLong(1234657890132456789)}); Since that number is way too large for a double, it will cause roundoff errors. Above number would be converted to NumberLong("1234657890132456704"), which is wrong, obviously.
Here are some supplements to make things more clear:
Firstly, Mongo shell is a JavaScript shell. And JS does not distinguish between integer and floating-point values. All numbers in JS are represented as floating point values. This means mongo shell uses 64 bit floating point number by default. If shell sees "9007199254740995", it will treat this as a string and convert it to long long. But when we omit the double quotes, mongo shell will see unquoted 9007199254740995 and treat it as a floating-point number.
Secondly, JS uses the 64 bit floating-point format defined in IEEE 754 standard to represent numbers, the maximum it can represent is:
, and the minimum is:
There are an infinite number of real numbers, but only a limited number of real numbers can be accurately represented in the JS floating point format. This means that when you deal with real numbers in JS, the representation of the numbers will usually be an approximation of the actual numbers.
This brings the so-called rounding error issue. Because integers are also represented in binary floating-point format, the reason for the loss of trailing digits precision is actually the same as that of decimals.
The JS number format allows you to accurately represent all integers between
and
Here, since the numbers are bigger than 9007199254740992, the rounding error certainly occurs. The binary representation of NumberLong(9007199254740995), NumberLong(9007199254740996) and NumberLong(9007199254740997) are the same. So when we query with these three numbers in this way, we are practically asking for the same thing. As a result, we will get back the same record.
I think understanding that this problem is not specific to JS is important: it affects any programming language that uses binary floating point numbers.
You are misusing the NumberLong constructor.
The correct usage is to give it a string argument, as stated in the relevant documentation.
NumberLong("2090845886852")

Custom Number formatting?

I have a Qlik Sense chart with one Dimension and one measure. the numbers I got from the measure is (99,999861) I need a custom format pattern to have the numbers like 99,99 %.
click edit, choose the chart, open the data tab, expand the measure, under number formatting select custom. Format pattern would be something like this.
#,##0.00%
Here's the syntax: https://help.qlik.com/en-US/sense/November2018/Subsystems/Hub/Content/Sense_Hub/Introduction/conventions-number-time-formats.htm
A few specifics from that page:
To denote a specific number of digits, use the symbol "0" for each digit.
To denote a possible digit to the left of the decimal point, use the symbol "#".
To mark the position of the thousands separator or the decimal separator, use the applicable thousands separator and the decimal separator.

Formatting a numeric field to fixed length in crystal reports

I have a crystal report where a numeric field needs to be a fixed length with a decimal and needs to not round up or down. I changed it to a text field but now when I run the report and I forget to change the options in crystal for a number field to show ####.## it rounds to nearest dollar amount and drops the cents. How can I fix it so I won't have to remember to change the options?
An example may be helpful -
If the field is numeric, or decimal, you can right click the field, select "format field", click Customize, Number, and select the rounding and decimal logic.
if you don't have enough decimal places allowed (say, zero decimals) then make sure the rounding is not set to "1" - that would cause the number to round up. if the rounding is less than or equal to the decimal places, it should just 'truncate' and not round.

How to round the result of a division in intersystems cache?

What's the best way to round the result of a division in intersystems cache?
Thanks.
There are some functions, which used to format numbers, as well they would round it if necessary
$justify(expression,width[,decimal]) - Caché rounds or pads the number of fractional digits in expression to this value.
write $justify(5/3,0,3)
1.667
$fnumber(inumber,format,decimal)
write $fnumber(5/3,"",3)
1.667
$number(num,format,min,max)
write $number(5/3,3)
1.667
$normalize(num,scale)
w $normalize(5/3,3)
1.667
You just can choose which of them much more suitable for you. They doing different things, but result could be same.
In standard MUMPS (which Cache Object Script is backwards compatible with)
there are three "division" related operators. The first is the single character "/" (i.e. forward slash). This is a real number divide. 5/2 is 2.5, 10.5/5 is 2.1, etc. This takes two numbers (each possibly including a decimal point and a fraction ) and returns a number possibly with a fraction. A useful thing to remember is that this numeric divide yields results that are as simple as they can be. If there are leading zeros in front of the decimal point like 0007 it will treat the number as 7.
If there are trailing zeros after the decimal point, they will be trimmed as well.
So 2.000 gets trimmed to 2 (notice no decimal point) and 00060.0100 would be trimmed to just 60.01
In the past, many implementors would guarantee that 3/3 would always be 1 (not .99999) and that math was done as exactly as could be done. This is not an emphasis now, but there used to be special libraries to handle Binary Coded Decimal, (BCD) to guarantee as close to possible that fractions of a penny were never generated.
The next division operator was the single character "\" (i.e. backward slash).
this operator was called integer division or "div" by some folks. It would
do the division and throw away any remainder. The interesting thing about this is that it would always result in an integer, but the inputs didn't have to be an integer. So 10\2 is 5, but 23\2.3 is 10 and so is 23.3\2.33 , If there would be a fraction left over, it is just dropped. So 23.3\2.3 is 10 as well. The full divide operator would give you many fractions. 23.3/2.3 is 10.130434 etc.
The final division operator is remainder (or "mod" or "modulo"), symbolized by the single character "#" (sometimes called hash, pound sign, or octothorpe). To get the answer for this one, the integer division "/" is calculated, and what ever is left over when an integer division is calculated will be the result. In our example of 23\2 the answer is 11 and the remaining value is 1, so 23#2 is 1
ad 23.3#2.3 is .3 You may notice that (number#divisor)+((number\divisior)*divisor) is always going to be your original number back.
Hope this helps you make this idea clear in your programming.

Sum and Divide a Bigint, Results with decimal precision?

I am storing a bigint value (for file sizes) in a table. I need to group on one column and for the filesizes (which are in bytes). I would like to have a column showing them by GB. This would mean Sum(FileSize/1024/1024/1024) which is not showing any decimal places. My research seems to indicate this may be due to truncation rather than rounding.
I have tried many options of cast and convert, but cannot seem to find any information about how to sum and divide a bigint, and maintain the decimals. If I take the sum and divide it in Excel, I get the decimals, which tells me there has to be a way to do this in SQL.
Any help is appreciated.
Sum(CAST(FileSize AS FLOAT)/1024/1024/1024)