SQL Server Performance

round

Discussion in 'SQL Server 2005 Reporting Services' started by arkiboys, Oct 10, 2007.

  1. arkiboys Member

    There is a filed in a table of type decimal(12, 8)
    when running a select query on this table for this field i.e.
    select field1 from table1
    the data is shown like:
    102.12500000
    104.12500000
    And therefore the report shows the same figure.
    How do I get this field to show up in the report as 4 decimal places. i.e.
    102.1250
    104.1250
    Tried the properties of the cell to format the text into a number but there is only 2 decimal places there.
    Even tried the expression by using Rnd(field1). This does not seem to do what I am after.

    Thanks
  2. FrankKalis Moderator

    Typically your client system would take care of this. If you want it to do with SQL Server you have to CAST or CONVERT it to the other type, e.g. CAST(... AS DECIMAL(12,4))
  3. FrankKalis Moderator

    Aargh, sorry missed to look at the forum you've posted to. Anyway, if all else fails, change the data type via the query.
  4. MichaelB Member

    Its OK Frank. You are allowed a few mistakes. You contribute so much to the forums man!
  5. FrankKalis Moderator

    Thank you! [:)]
  6. Madhivanan Moderator

    As usual I would say "If you use front end, then do formation there" [:)]
    I think SSRS may support VB's Format function
    Format(Rs("col"),"######.0000")
  7. Madhivanan Moderator

    [quote user="FrankKalis"]
    Aargh, sorry missed to look at the forum you've posted to. Anyway, if all else fails, change the data type via the query.
    [/quote]
    Becuase there is no Forum name display against a topic in Active Lists [:)]
  8. FrankKalis Moderator

    Correct!
    That would really be a great help.
  9. MichaelB Member

    in some ways I miss the old forum format. I like seeing if threads I worked on have new info. I cant seem to see that. just lists my worked threads.
  10. FrankKalis Moderator

    [quote user="MikeEBS"]
    in some ways I miss the old forum format. I like seeing if threads I worked on have new info. I cant seem to see that. just lists my worked threads.
    [/quote]
    Same here. But I also think that is to a certain degree something like "old habits die hard".
  11. satya Moderator

    You could use the forum search functionality for such interested ones [;)].
  12. consolidata New Member

    Have u tried formatting the cell to #,#.0000 ? I am assuming you are using Reporting Services to render the report.
  13. MichaelB Member

    Using RS format N4 will also do the trick i think:)

Share This Page