I've spent two days on this and no one at work knows Crystal Reports. I'm new at the job and to CR. I've used SSRS in the past.
I hope someone can help me with this. I'll go step by step.
1. I have a main report and some some reports. The datasource for them is datatables. I see the datatables being populated but the subreports aren't. I changed a datasource for one of them and I wonder if that caused the issue.
2. This is the Main Report and has "Transactions" subreport
3. I changed the datasource to a new datatable for subreport Transactions
4. I see the Database Fields.
5. This is how I updated the Datasource for the subreport. The one marked X is the old one and I updated it to the new one..marked with circle.
6. I see 2 datasources but I'm using the first one
7. I checked the subreport and I see this. I don't think I need that checkbox to link to the main report. I tried it with and without the checkbox.
8. I see the data when I step thru the code
9. I don't see the data on the report
I've tried lots of things; Populated the old datatable, copied the new datatable to old one, set the datasource in the code, cleared the datasource in code, assigned it again. I also added a test subreport and that didn't get populated either.
Is my option to delete the subreport and readd it? doubt that would work because I added a test subreport (as I said above) but that didn't get populated either.
Some code that the ex developer wrote:
rp = new WindowsReportingApplication.Account_History.CrystalReport_AccountHistory();
rp.ResourceName = "CrystalReport_AccountHistory.rpt";
ReportDocument sr1 = rp.OpenSubreport("Transactions");
//*** I tried these but didn't work
//rp.Subreports["Transactions"].DataSourceConnections.Clear(); //camilla try
// ReportDocument sr1 = rp.OpenSubreport("Transactions");
//sr1.DataSourceConnections.Clear(); //camilla try
//sr1.SetDataSource(ds.Tables["ST_CCL_DC_AccountHistory_List"]); //camilla try