Skip to Content
0
Former Member
Jan 13, 2011 at 02:21 PM

Passing DataTable to a subreport

148 Views

I have a Crystal Report XI RPT that uses sub reports. The report takes a series of department ids and prints one departmentsu2019 information on each page. Also, on each page, the sub report needs to display a list of personnel in those departments.

Iu2019m using C# to pass a DataTable to the main report using the SetDataSource() method. The department information on the main prints properly. How can I pass the personnel information to the subreport so it prints as well? Do I need to pass a DataTable of all the personnel to the report source of the subreport? When I tried this nothing printed. If I bind it to a stored procedure it all works fine. What do I need to do here?

Thanks

Carl