SQLTeam.com | Weblogs | Forums

Ssrs 2008 add parameter to subreport


In an existing ssrs 2008 report, I would like to change a dataset for a subreport to use the following sql:

CREATE TABLE #Homeroom (personID INT,
studentNumber VARCHAR(15),
serviceType VARCHAR(1),
enrollmentID INT,
calendarID INT,
schoolID INT,
teacherPersonID INT,
teacherFirstName VARCHAR(50),
teacherMiddleName VARCHAR(50),
teacherLastName VARCHAR(50),
teacherName VARCHAR(104),
sectionTeacherDisplay VARCHAR(102),
roomID INT,
roomName VARCHAR(10),
courseID INT,
courseHomeroom BIT,
sectionID INT,
sectionHomeroom BIT,
rosterID INT,
trialID INT,
periodID INT,
periodScheduleID INT,
structureID INT,
termID INT)

EXEC TEST.dbo.spHomeroom @endYear, @calendarID, @serviceType, @personID

I want to use a parameter value of @serviceType instead of passing the hardcoded value of 'P'
Here is the existing logic:
EXEC TEST.dbo.spHomeroom @endYear, @calendarID, 'P', @personID.

Thus would you tell me what I can do to add the @serviceType parameter value to the existing subreport?
Do I need to change the t-sql somehow?


The requirement has changed. I do need to pass in the value of @serviceType instead of hard coding the value of 'P'.