Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9244697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:06:00+00:00 2026-06-18T09:06:00+00:00

I Have an SSRS 2008 Report whose dataset runs a SQL query that returns

  • 0

I Have an SSRS 2008 Report whose dataset runs a SQL query that returns a calculated column. This dataset fills a table in the report.

The calculated column is returning up to 4 decimals. I want to round to the nearest 2 decimals. i.e., 8660.125 should become 8660.13, 1487.8521 should become 1487.85

Sample of the query:

select [Hours] * [Rate] * [Complexity] * [Efficiency] from Hours

I would perfer to perform this rounding in the SQL Query rather than the SSRS table because we are trying to keep the tables “unintelligent” so we can encapsulate all our logic in the SQL Query itself. Suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T09:06:01+00:00Added an answer on June 18, 2026 at 9:06 am

    There are two issues here.

    The first is the rounding. This can easily be done with the Round function in SQL:

    SELECT Round(8660.125, 2);
    -- returns 8660.130
    

    The second, as you can see, is that this still returns 3 digits after the decimal point. This is due to the data type. You got your rounded value, but it is still showing an extra digit.

    You can fix that this way:

    SELECT Convert(decimal(16, 2), 8660.125);
    --returns 8660.13 by implicitly rounding--you could round first but not needed
    

    However, these two values above are identical numerically. And in my opinion, you shouldn’t be dealing with presentation on the SQL Server side at all. If you want two decimal places, just set the cell’s format in your SSRS report to #.00. This will ensure you get the number of (rounded) decimal places you want, no matter what! There is no function needed. Just a simple property.

    It’s the same principle for dates. The underlying value of a date is just a number. But there are myriad ways to present dates to the user–with long names or different order of the parts or using different separators. Every time you change date formats will you go all the way back to your SQL and change your Convert() style?

    You don’t expect your SQL Server to determine the font, color, size, padding, style, position, or visibility of these numbers in the report. Those all have to be set manually at design time, too. So why would how the value is displayed (when the values are exactly equal) be any different? In my opinion, pushing this into the SQL query is moving the area of concern to the wrong place. That is adding complexity (not “intelligence”) to the query that doesn’t need to be there! And I don’t see setting the numeric format of a cell to be “adding intelligence” either.

    It’s a presentation concern, so keep it in the proper place that all other presentation elements are addressed–the SSRS report.

    Update

    I can think of one scenario where you would want to perform the conversion in your query, and that’s when the value will be further used in more calculations and the business rules about said calculation require it. For example, if you were calculating bank interest, they could have rules like “after step 1 round to 4 decimal places, then and after step 3 finally round to 2 decimal places (dollars and cents).” But that is a different story: now the value matters, not just its display.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Report Server that runs SSRS 2008 R2 Standard. This server retrieves
I have a SSRS 2008 RDL report that I deploy on our report server.
I have a SQL 2008 developer edition with SSRS and the report manager is
I have a query which should be later used to build an SSRS-2008 report.
I have a report in SSRS 2008 that shows data aggregated from four levels
I have an SSRS 2008 report that contains a table with 3 columns. The
i have set a sql report server [ssrs 2008 r2] and the url is
I have multiple SSRS 2008 report templates that contain embedded images and these are
I have a report I am developing in BIDS for SSRS 2008 R2 that
I have a Report in SSRS 2008 that looks like so: For the Sales

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.