SQLTeam.com | Weblogs | Forums

Ssrs 2008 add parameter to subreport


#1

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)

INSERT INTO #Homeroom
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?


#2

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