Try the RAS SDK's SubreportControllerClass.ImportSubreport Method or the ImportSubreportEx Method.
Insert a subreport dynamically in main crystal report
-
04-10-2022 - |
문제
I am making a report in SAP Crystal Reports. I made couple of header and footer "templates" which I need to switch in via C# code. Here is the thing, in my main report, I inserted one header and one footer report which are there by default and depending on parameter I need to switch them with some external "template" which is somewhere on the disc.
I know how to access the subreport via code and to change the values of the objects, but I don't know how to switch them:
ReportDocument mainReportDocument = new ReportDocument();
ReportDocument subReportHeader = mainReportDocument .Subreports["Header.rpt"];
....
Thanks in advance.
해결책
다른 팁
Try this code:
ReportDocument mainReportDocument = new ReportDocument();
ReportDocument subReportHeader = mainReportDocument .Subreports["Header.rpt"];
제휴하지 않습니다 StackOverflow