• Decimal places

    Author
    Topic
    #465051

    I have a report that I can’t shorten the number of decimal places on it. I have set the text box and both queries that create the report to fixed format and 1 decimal places. But I keep getting anywhere from 1 to 8 decimal places. Any ideas? What is the obvious thing that I am missing? Thank you. Fay

    Viewing 1 reply thread
    Author
    Replies
    • #1193194

      It seems that you are changing the display of the numbers, not their values. Use functions like Round() or Int() — Int(MyNumber*10+0.5)/10 rounds a number to its first decimal for example. Depending on your database engine, the names of the functions may be different.

      • #1193309

        Thank you Stephane the int worked. I appreciate your help. Fay

        It seems that you are changing the display of the numbers, not their values. Use functions like Round() or Int() — Int(MyNumber*10+0.5)/10 rounds a number to its first decimal for example. Depending on your database engine, the names of the functions may be different.

    • #1193208

      Try setting the Format property of the controls on the report to Fixed, then specifying the desired number of decimal places.

      • #1193310

        Thank you John. I had used this approach without success. It worked with the queries, but didn’t work on the report. Go figure why the numbers would change layout from what the query reported to the report. Finally used the suggestion from Staphane and got the report to work correctly. Fay

        Try setting the Format property of the controls on the report to Fixed, then specifying the desired number of decimal places.

    Viewing 1 reply thread
    Reply To: Decimal places

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: