pass dataset to sub report

D

Dave

I have a crystal report that I pass a dataset to using the following code,

Report1 mr = new Report1();
Commis3TableAdapters.AllCommisTableAdapter m_report = new
Reporter.Commis3TableAdapters.AllCommisTableAdapter();
Commis3.AllCommisDataTable rpdata = m_report.GetData();
mr.SetDataSource((DataTable)rpdata);

crystalReportViewer1.ReportSource = mr;

This works fine for the main report, but sub report Report2 is blank. If I
set mr to Report2 to a different dataset it will run report2 by itself ok.
The reports do not use the same data. How do I pass a second dataset to
crystal so that both the main report and the subreport will display data?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top