I can't get the sub-report to display data when printing from my C# code.
I have a main report with a sub-report. The main report has two parameters, one that is linked to the subreport. When I view the report in the editor or stand-alone Crystal Reprots the sub-report populates correctly, passing the linked parameter to the subreport.
When I print the report in code, nothing shows in the sub-report. I tried setting the parameter in the sub-report but recieved an error. I am using CR Developer 2008, Full version, 184.108.40.2063, with Visual Studio 2008 (c# & WPF). I just purchased this version of CR and have not found any updates or hot fixes.
Here is the code:
= new CrystalDecisions.CrystalReports.Engine.ReportDocument();
report.SetDatabaseLogon("", "", "", ""); //(i removed these values)
report.PrintToPrinter(1, false, 1, 1)
Thanks for any help.