In the script below I have created a sql variable called "Assigned" with the values of 1 or 0. I have tried to use a SqlDataSource to display this variable as a CheckBoxField but it default to a BoundField. Could some one give me the HTML to make this variable work as a CheckBoxField.
CREATE PROCEDURE ssrSP_getCourse_Campus
@CourseNum as varchar(10),
@SessionNum as int,
@yrId as int=5
AS
select
sc.schoolId as CampusId,
sc.schcode,
sc.SchoolName,
cc.courseNumber,
(select count(*)
from course_type_session ct
join schoolSession ss on ct.schoolSessionId = ss.schoolSessionId
join Session s on ss.SessionId = s.Id
join course c on c.Id = ct.courseId
where c.coursenumber = cc.courseNumber
and c.schoolCode = sc.schCode
and s.SchYearId = @yrId
and s.SessionNo = @SessionNum) as CntSession,
CASE
WHEN exists(select 1
from course_type_session ct
join schoolSession ss on ct.schoolSessionId = ss.schoolSessionId
join Session s on ss.SessionId = s.Id
join course c on c.Id = ct.courseId
where c.coursenumber = cc.courseNumber
and c.schoolCode = sc.schCode
and s.SchYearId = @yrId
and s.SessionNo = @SessionNum) THEN 1
ELSE 0
END as Assigned
from school sc
join course_catalog cc on sc.academiclevelid = cc.Academiclevelid
where cc.coursenumber = @CourseNum
and sc.SSCampus = 1
and sc.Active = 1
and sc.schoolYearId = @yrId
GO
Start Free Trial