Reputation: 79
I'm working with SSRS Report that display the grades of Students. I need to display the grades which are already rounded to the nearest integer and I'm ok with that. But I'm wondering why the decimal places still appears even if the grades is already rounded and I already set the textbox properties to 0 decimal places. I've notice that it was started when I used cast. What is the problem? I need to cast the grades because of my condition. Please see below sql syntax and images.
I used MSSQL Server 2008 and Report Builder 3.0 r2
Here's my sql syntax in getting the grades of student
,(CASE
when dtl.STUDENT_GRADE < 1 or dtl.STUDENT_GRADE is null Then '-' Else
CAST(dtl.STUDENT_GRADE AS nvarchar(20))end) as GRADE
This is the report looks like and my settings in text box . Please see image
Upvotes: 1
Views: 378
Reputation: 79
I found a solution to my problem, Since the cast gives me an issue with the decimal places, I changed the condition to set the grades of student to 0 if the grades is NULL or less than 1. Then I set the text box properties to show (-) if the value is 0.
Thanks for all your help it gives me an idea to solve my problem.
Upvotes: 0
Reputation: 11376
Try setting the Category to "Custom" and then set "Custom format" to N0
Upvotes: 1