I have a table in a report that is displaying some call duration data. I
have a field that averages the results and displays them. My issue is the
result is often a number with many decimal places (example 15.888883) and I
would like the field to display a whole number (example 15).
In report designer I right click on the cell in the table I wish to alter
and choose properties. In the Textbox Properties window under Format I
select Number and then 1234 (custom code D0) and click OK. I then preview
the report and the number still shows a bunch of decimal places.
When I go back to check the properties of the cell the Format is often reset
back to 'Default' as if it didn't save my select. I've tried using the
Standard and Custom radio buttons under Format but nothing I do seems to
change the display of the number to a nondecimal type. I'm sure I can run a
function that rounds the number but I'd much rather do it in the display as
it seems you should be able to do.
Any help would be appreciated!
Peace,
DanDan,
I'm not aware of this as a bug but if it is try setting it in the
properties window (not the same as right-click|properties) if you can't
see it, press F4. You will see a 'Format' property, set that to d0 or
alternatively try n0 (puts a comma in as a thousands seperator).
Chris
Dan Christjohn wrote:
> I have a table in a report that is displaying some call duration
> data. I have a field that averages the results and displays them. My
> issue is the result is often a number with many decimal places
> (example 15.888883) and I would like the field to display a whole
> number (example 15).
> In report designer I right click on the cell in the table I wish to
> alter and choose properties. In the Textbox Properties window under
> Format I select Number and then 1234 (custom code D0) and click OK. I
> then preview the report and the number still shows a bunch of decimal
> places.
> When I go back to check the properties of the cell the Format is
> often reset back to 'Default' as if it didn't save my select. I've
> tried using the Standard and Custom radio buttons under Format but
> nothing I do seems to change the display of the number to a
> nondecimal type. I'm sure I can run a function that rounds the number
> but I'd much rather do it in the display as it seems you should be
> able to do.
> Any help would be appreciated!
> Peace,
> Dan|||Chris,
Thank you for your reply. d0 did not work and that was a value for format
that I had already tried. n0 however worked great and change the display
from 8.333333336 to 8 exactly the way I want it. Weird how that's not one of
the choices when you rightclick/format and it shows the standard formatting.
Oh well it works, thanks much!
Peace,
Dan
"Chris McGuigan" <chris.mcguigan@.zycko.com> wrote in message
news:ez03hkRiFHA.1204@.TK2MSFTNGP12.phx.gbl...
> Dan,
> I'm not aware of this as a bug but if it is try setting it in the
> properties window (not the same as right-click|properties) if you can't
> see it, press F4. You will see a 'Format' property, set that to d0 or
> alternatively try n0 (puts a comma in as a thousands seperator).
> Chris
>
> Dan Christjohn wrote:
>> I have a table in a report that is displaying some call duration
>> data. I have a field that averages the results and displays them. My
>> issue is the result is often a number with many decimal places
>> (example 15.888883) and I would like the field to display a whole
>> number (example 15).
>> In report designer I right click on the cell in the table I wish to
>> alter and choose properties. In the Textbox Properties window under
>> Format I select Number and then 1234 (custom code D0) and click OK. I
>> then preview the report and the number still shows a bunch of decimal
>> places.
>> When I go back to check the properties of the cell the Format is
>> often reset back to 'Default' as if it didn't save my select. I've
>> tried using the Standard and Custom radio buttons under Format but
>> nothing I do seems to change the display of the number to a
>> nondecimal type. I'm sure I can run a function that rounds the number
>> but I'd much rather do it in the display as it seems you should be
>> able to do.
>> Any help would be appreciated!
>> Peace,
>> Dan
>|||Hi,
I just had the exact same problem. Choosing D0 does not work, but N0
does. This behaviour is weird and should be fixed because N0 puts a
comma in there.
e.g.
source = 2793.333333
D0 = 2793.333333
N0 = 2,793
When what I really want is 2793!! I think this is a bug. Internally,
the casting from float (with decimal) places is not being converted to
integeter properly.|||I think n with no zero will remove the comma but I'd have to test it to be
sure.
"Roy Assaly" <royassaly@.gmail.com> wrote in message
news:1121885650.591601.179260@.g43g2000cwa.googlegroups.com...
> Hi,
> I just had the exact same problem. Choosing D0 does not work, but N0
> does. This behaviour is weird and should be fixed because N0 puts a
> comma in there.
> e.g.
> source = 2793.333333
> D0 = 2793.333333
> N0 = 2,793
> When what I really want is 2793!! I think this is a bug. Internally,
> the casting from float (with decimal) places is not being converted to
> integeter properly.
>|||Hi Dan,
Just tested it:
source = 2793.333333
n = 2793.33
N = 2793.33
No difference. I still believe that D0 is the problem and that it's a
bug.|||'n' on it's own will always default to 2 decimal places.
I think the 'D' issue is because d or D is also a date format code it
may be getting confused!?!
You may want to consider custom format codes.
#0 or ## will give you 2793 with no commas. Using this you can specify
different formatting for positive, negative and zero numbers.
i.e. a format code of #,#;(#,#);"zero" would produce
2793 = 2,793
-2793 = (2,793)
0 = zero
Look up custom format codes in msdn vb help.
Chris
Roy Assaly wrote:
> Hi Dan,
> Just tested it:
> source = 2793.333333
> n = 2793.33
> N = 2793.33
> No difference. I still believe that D0 is the problem and that it's a
> bug.
Wednesday, March 7, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment