Passing Parameter from sub report to main report
I have two reports, a main report that pulls EmployeeNumber, Firstname,LastName.... IN the second report i am pulling back details of the activities the person completed... These reports run with no errors independently. I am trying to add the second report as a sub report... I have added the sub report box to the parent report and selected the report that i want t be the sub report. I am having problems getting the sub report to show up w/o errors. When i add the employeeNumber param to the parent report and also add in the dataset where EmployeeNumber=@employeeNumber I receive an error about forward codependencies not being valid. How can i link these two reports together. Thanks in advance select distinct e.EmployeeNumber, e.FirstName,e.LastName from Employees e join XREFEmployeesInvitations XREF on XREF.EmployeeId=e.Id where ActivityId IN ('113' ,'114', '48460','48461','48462') and IsCompleted=1 and xref.IsSpouse=0 select e.EmployeeNumber,XREF.IsSpouse,acd.questionid,acd.data,XREF.ActivityId from Employees e join XREFEmployeesInvitations XREF on XREF.EmployeeId=e.Id join ActivityComplianceData acd on acd.EmployeeId=e.Id where XREF.ActivityId IN ('113' ,'114', '48460','48461','48462') and IsCompleted=1 and xref.IsSpouse=0 and acd.IsSpouse=0 order by ActivityId
March 21st, 2011 3:34pm

Hi SBolton, You cannot pass parameters from the subreport to the parent report (judging from your question title this is what you are trying to do). You can only pass parameters from the parent report down to the subreport. This is fairly easy to achieve. If you have a parameter Employee Number in the subreport you can link it to an expression (which can be a filed, parameter, constant or the result of some script) by changing the subreport properties. Please read the following article on msdn for a detailed walkthrough: http://msdn.microsoft.com/en-us/library/ms160348.aspx Boyan Penev --- http://www.bp-msbi.com
Free Windows Admin Tool Kit Click here and download it now
March 22nd, 2011 2:47am

Hi SBolton, You cannot pass parameters from the subreport to the parent report (judging from your question title this is what you are trying to do). You can only pass parameters from the parent report down to the subreport. This is fairly easy to achieve. If you have a parameter Employee Number in the subreport you can link it to an expression (which can be a filed, parameter, constant or the result of some script) by changing the subreport properties. Please read the following article on msdn for a detailed walkthrough: http://msdn.microsoft.com/en-us/library/ms160348.aspx Boyan Penev --- http://www.bp-msbi.com
March 22nd, 2011 2:47am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics