Hi, I have the following select query with a CASE statement as part of it but it will not show up as a field in my dataset!I have tested the CASE statement works in SQL Management Studio and it is fine. Is there some setting or reason why a CASE statement wouldn't show up as a selectable field in the dataset in SSRS?SELECT rdowner.V_ACTIVITY.Name AS Name, rdowner.V_ACTIVITY.Duration * @PeriodDuration / 60.0 AS Duration, [b]CASE WHEN (rdowner.V_ACTIVITY_DATETIME.Week <= 11) THEN 'Term1' WHEN (rdowner.V_ACTIVITY_DATETIME.Week >= 15) AND (rdowner.V_ACTIVITY_DATETIME.Week <= 27) THEN 'Term2' WHEN (rdowner.V_ACTIVITY_DATETIME.Week >= 28) THEN 'Term3' ELSE 'Fail' END AS TermWeek, [/b]rdowner.V_ACTIVITY_DATETIME.Week AS Week, rdowner.V_ACTIVITY_DATETIME.Day AS Day, rdowner.V_STAFF.Id AS StaffId, rdowner.V_STAFF.Name AS StaffName,rdowner.V_STAFF.DepartmentId AS DepartmentId, rdowner.V_STAFF.IsPartTime AS IsPartTime, rdowner.V_STAFF.MaximumHours AS MaximumHours, rdowner.V_DEPARTMENT.Name AS DepartmentNameThanks in advance...
↧