Spinner Input Control - Anyway to remove decimals?

Hi,

The subject pretty much says it all here. I’m using a spinner input control to let users pick a number of months (1-6). It works fine, and changes by whole number (since increment is set to 1.0), but the control displays values like 3.00 instead of just 3, which is what I’d prefer.

Not a big deal, but kind of annoying on this report.

Thanks for your help!


JSW (BOB member since 2013-01-15)

did you try creating a variable and getting desired format and then using this variable as source for input control


haider :es: (BOB member since 2005-07-18)

The Input Control is based on a measure variable. I’m not aware of a way to format a variable, other than using functions such as FormatNumber, which I tried, but that did not have any impact on the spinner control.

I’ve also looked at the other control types. The Combo box would actually be a good choice for this report, except for the “All values” option - is there anyway to remove that choice? The Simple slider would also work, but functionally I think it’s easier to use the spinner than the slider.

Thanks!


JSW (BOB member since 2013-01-15)

My version is 4.1 SP4 and I can very much format the measure variable and use it in input control with the desired format

what exact version you are on?


haider :es: (BOB member since 2005-07-18)

We are still on 4.0 (not sure which service-pack) - we will be upgrading to 4.1 later this year.

Could you please explain and/or provide a screen-shot on how you are formatting a measure variable for use in a spinner input control? Perhaps that is a new feature of 4.1, or perhaps it’s just another WebI feature that I’m not aware of!

Thanks for your help!


JSW (BOB member since 2013-01-15)

 =formatnumber([measure_obj];"#,###") 

Its not a new feature, it was there even in 3.1 version.
Not sure about 4.0 as I dont have it at my place


haider :es: (BOB member since 2005-07-18)

I am familiar with FormatNumber. However, when I apply it to the variable the spinner input control is based on, all it does it changes the initial value to “0”, regardless of what initial value I try to set it to.

I have attached a screenshot showing the results I’m getting. When I set the variable to ‘=3’, the spinner control shows “3.00”. When I set the variable to ‘=FormatNumber(3; “#,##0”)’, the spinner control shows “0”, and then changes to “1.00” when I change it the first time. I believe the reason it starts at “0” (regardless of the value I use in FormatNumber), is because the control does not recognize FormatNumber.

Are you able to suppress the decimals using FormatNumber in 4.1, including the values after you move the spinner up or down?

Thanks!
Input Control.jpg


JSW (BOB member since 2013-01-15)

actually you dont need to use any function to remove the decimal places, it should work without it

and another thing is the spinner option doesnt show up on a string (when formatnumber is used)


haider :es: (BOB member since 2005-07-18)

Yes, it is working fine as is (without using FormatNumber).

As I mentioned in my initial post, this is really just a personal preference to not show two decimal places on the control when it is being used to select a whole number.


JSW (BOB member since 2013-01-15)